A system admin often writes Bash scripts, some short and some quite lengthy, to accomplish various tasks. Over the years, I’ve amassed a collection of various techniques for enhancing my Bash scripts, and I’d like to share some of them in hopes they can help others. Here is a collection of small scripts created to illustrate these simple examples.
Source: LXer – 5 ways to improve your Bash scripts