For portability, you should probably use /bin/bash in the shebang (#!/bin/bash) instead of /bin/sh.
Depending on the system you run the script on, "/bin/sh" could the original Bourne Shell or a symlink to bash, ash or dash (like it is on *buntus).
Not necessarily the culprit here, but it can lead to some inconsistencies in syntax and execution.
Depending on the system you run the script on, "/bin/sh" could the original Bourne Shell or a symlink to bash, ash or dash (like it is on *buntus).
Not necessarily the culprit here, but it can lead to some inconsistencies in syntax and execution.
Comment