Thursday, June 18, 2009

DOS/MAC to Liunx/Unix text file converter

This is a common problem if you work on linux/unix flavors and when you check out you find an shell script which is just an ascii file is not working, when you try to run it says "bash: ./mk.sh: /bin/sh^M: bad interpreter: No such file or directory"

Simple solution is to convert the text file (shell script) which is in DOS/MAC into LINUX/UNIX text format using "dos2unix" command. Need to run as "dos2unix "

No comments: