Does running the script mentioned above with bash (as opposed to plain sh) explicitly affects the problem?
Could you change #!/bin/sh to #!/bin/bash and try again?
Does running the script mentioned above with bash (as opposed to plain sh) explicitly affects the problem?
Could you change #!/bin/sh to #!/bin/bash and try again?