Sometimes when I run the shell scripts in Linux, It gives me error “: bad interpreter: No such file or directory”. The issue raised whenever I transfer my scripts from windows to Linux.
A Perl command can resolves the issue easily.
Try the following command on your text file then try and run it.
perl -i -pe’s/\r$//;’ <file name here>
Posted by jaymspatel