Sunday, April 3, 2016

how to resolve "M: bad interpreter" while working with bash scripts

This is a common problem if you try to port a script created in windows environment to unix,
 /bin/bash^M: bad interpreter: No such file or directory
How to solve this,

run dos2unix <BASH_SCRIPT>
Eg:- dos2unix run.sh

For further information: http://www.linuxcommand.org/man_pages/dos2unix1.html

No comments:

Post a Comment