change #!/bin/sh to #!/bin/bash