I had similar problems and it turned out to be problem with line-endings. You use windows/linux/mac line endings?
Edit: forgot the script name, but as OP says, it’s dos2unix <filename>
I had similar problems and it turned out to be problem with line-endings. You use windows/linux/mac line endings?
Edit: forgot the script name, but as OP says, it’s dos2unix <filename>