I\'m trying to run a sh script and get the following error on Mac:
sh
/usr/bin/perl^M: bad interpreter: No such file or directory
How
You seem to have weird line endings in your script: ^M is a carriage return \r. Transform your script to Unix line endings (just \n instead of \r\n, which is the line ending on Windows systems).
^M
\r
\n
\r\n