This post is part of a series: Bash Tips and Tricks.
I’ve been hacking a lot of Bash lately. Tariten Trading uses Linux end-to-end so I’ve had ample opportunity to scrub off the rust that has accumulated on my shell scripting skills. I’ve decided to write an irregular series highlighting some of the more interesting Bash snippets I create and come across.
One of the great things about Bash is that it not only teaches you the syntax of the language, but it also imparts the syntax and philosophy of the GNU and Unix tool chain that underpins everything you do. Indeed, the syntax of the Bash is only a small part of truly learning to write effective Bash scripts; a much larger part involves learning the tools that underpin the entire environment, such as Sed and Awk.
This won’t be a tutorial on how to use Bash, but will instead focus on specific recipes that people familiar with the language and environment can put to use. I’ll try to keep each snippet short and sweet, and where available I’ll offer alternate solutions and source references such as links to relevant Stack Overflow questions.
All posts in the series, most recent is first: