New answers tagged dash
Do not source the script (source script or . script). Instead just run it normally script.
Instead of running the parent script as is: ./sh.sh, I ran it using bash: bash sh.sh. Worked. I have a hidden assumption that sh is a subset of bash. Not sure if it's correct, but worked.
Top 50 recent answers are included