Difference between revisions of "Dos2unix"

From wikipost
Jump to navigationJump to search
(No difference)

Latest revision as of 11:39, 20 January 2013

A simple but effective script that strips out the /r (Carriage Return) character from DOS-based text files so that you don't see ^M at the end of every line when viewing under linux.


echo "dos2unix"
for file in "$@"
  tr -d "\r" <$file>$file.unix