SyntaxFix
Write A Post
Hire A Developer
Questions
Run following command in terminal
sed -i -e 's/\r$//' scriptname.sh
Then try
./scriptname.sh
It should work.