Writing Bash Scripts that aren't Only Bash: Checking for Bashisms and Using Dash
Shells like Bash or Zsh are advanced and user-friendly, and include features beyond what a simpler POSIX-compliant shell might offer. You will do well to utilize the full features of your shell when writing scripts.
There are situations, however, when portability should be a valued feature, allowing the script to run on a variety of shells. ...more