2011年12月5日 星期一

How to check if my text or script does have “carrage return” CR in Linux

For example, I have a script called myscript.sh

Command:

$ cat –v myscript.sh

If I forgot to convert it into Unix format, I would have a output like this:

#! /bin/bash^M
^M
echo "Steve"^M
echo "Test"

沒有留言: