We know that windoz and unix save files with different endings for each line. If you write a shell script under windoz, it will not work under unix. It may shows ": command not found" on the command line. To solve this problem, we need to change the file format. An easy way to do this is:
$ tr '\r\n' '\n' < dosfile > unixfile
This will replace all the '\r\n' at the end of each line with '\n'.
Subscribe to:
Post Comments (Atom)
2 comments:
we need new poster
Hi, Buddy, I usually do it in another way
perl -pi -e"s/\r\n/\n/g" youfile
Post a Comment