When copying a shell script from Windows to Linux and execute it:
/bin/bash^M: bad interpreter: No such file or directory
Solution: Remove \r:
sed -i ‘s/\r//’ scrip_file.sh
When copying a shell script from Windows to Linux and execute it:
/bin/bash^M: bad interpreter: No such file or directory
Solution: Remove \r:
sed -i ‘s/\r//’ scrip_file.sh