If you are run the shell script and shows following error bad interpreter you need to check the script file format. We have already discussed and fixed this same error on previous post and this is another way solution.
# stat run-script.sh
./run-script.sh : /bin/sh^M : bad interpreter
To be Solved this error,
Open your script with text editor vi or vim,
Enter the escape (ESC) key,
Type the below line,
:set fileformat=unix
Finally save that file,
:x! or :wq!
Now check with same command the file format : stat.
Comments (0)