The default shell (/bin/sh) under Ubuntu focuses to run, not slam.
me@pc:~$ readlink - f $(which sh)
So in the event that you
chmod +x your_script_file.sh and, run it with ./your_script_file.sh
or on the other hand assuming you run it with slam your_script_file.sh, it ought to turn out great.
Running it with sh your_script_file.sh won't work on the grounds that the hashbang line will be disregarded and the content will be deciphered by run, which doesn't uphold that string substitution syntax.