TOP IMAGE
Resource Links
WARNING: Limited functionality mode due to unsupported browser

BASH Scripts

Updated on February 26, 2016

BASH is probably the most widely used shell (Unix command language) in Linux and Mac OS. When used as a scripting language, it is quite powerful especially when combined with typical Unix concepts of everything is a file and piping application output into the input of another application including text filtering or processing programs such as grep, awk, or sed. Unfortunately, like many shells, BASH can be quite cryptic or appear to be quite obfuscated without even trying. Part of this is due to history in regards to Unix based command line programs many of which use short and seemingly unusual names. In addition, most of these programs have switches (sometimes dozens) that enable or disable various features that can be quite terse (e.g. even just a single letter) which compounds the problem of readability. In short, it is not difficult to write a compact yet powerful BASH script which is difficult to read and understand. This is part of the reason why I recommend BASH mainly to automate or simplify small tasks especially when multiple command line programs will be involved. For anything more advanced, I would recommend using Python which is typically bundled with most Linux distributions.


To obtain more information on writing BASH scripts, here are some of the references that I have used:


Copyright © 2016 Walter (All rights reserved)