I don't want to install dos2unix via port and I know it's just a matter of search and replace those ^M chars.
Here are a couple of command that should do the job of removing those trailing ^M (carriage return) chars.
perl -pi -e's/\r//g' filename
sed -e's/^M//g' filename > newfile
To type ^M in Terminal do Ctrl+V then Ctrl+M.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment