You are viewing a single comment's thread. Return to all comments →
but what if we are programming unix shell script ?
unix shell is bash
It's not true. For example on OpenBSD shell is ksh, not bash.
Get used to always have SheBang #!/bin/bash as the first line of the script.
Bash ususally is installed. If not try ksh, it is very similar.
If you want to write compatible script, use dash from Debian and use SheBang #!/bin/sh. But beware, many external programs are a bit different, for example on OS-X.