Hi Sham
bash is Bourne Again Shell (the spelling is deliberate homage to Mr Bourne who wrote the original Bourne Shell: sh).
Bash is supposed to be compatible with sh, but with extensions to sh to make bash easier to work with. If you use one of these extensions in bash, then the script will no longer work in sh (or may work differently, but that is rare).
The simplest solution is that since your script works with bash, use bash
If you really want to get it working with sh, then post the lines from the script file that are failing (including any setup code) and we can try and advise you.
Regards, Andrew