greycat 1283872999 learn sh is the POSIX or Bourne shell, not bash. Even if sh is a symlink to bash, running a script under 'sh' (either by typing 'sh myscript' or putting '#!/bin/sh' at the top) *disables* many bash features. See http://mywiki.wooledge.org/BashGuide/Practices#Choose_Your_Shell lhunath 1383932442 forget lhunath 1383932664 learn sh is NOT bash. It is a POSIX/bourne shell. To run bash code, your script MUST have #!/bin/bash at the top and it MUST be either executed directly or with bash (ie. NOT sh myscript). Some /bin/sh link to bash, you cannot rely on this and it will disable most bash features. http://mywiki.wooledge.org/BashGuide/Practices#Choose_Your_Shell greycat 1475765707 forget greycat 1475765709 learn sh is NOT bash; it is a POSIX or Bourne shell. To run bash code, your script MUST use a bash shebang, and it MUST be executed directly or with bash (NOT sh myscript). Sometimes /bin/sh symlinks to bash, but you can't rely on this and it will disable many bash features. geirha 1641499137 forget geirha 1641499143 learn sh is NOT bash; it is a POSIX shell. To run bash code, your script MUST use a bash shebang, and it MUST be executed directly or with bash (NOT sh myscript). Sometimes /bin/sh symlinks to bash, but you can't rely on this and it will disable many bash features.