How to remove ^M character
parv
parv_fm at emailgroups.net
Fri Aug 1 17:42:47 PDT 2003
in message <8163366.1059777948620.JavaMail.paulbeard at mac.com>,
wrote Paul Beard thusly...
>
> got room for one more?
>
> perl -pi -e s#\\r#\\n#g <your file name>
Doesn't work...
file p
p: ASCII text
unixdos p q
UnixDos 1.0.13 - SUMMARY: A total of 3 end of line characters were modified.
file p q
p: ASCII text
q: ASCII text, with CRLF line terminators
perl -pi -e 's#\\r#\\n#g' q # quotes are mine
file p q
p: ASCII text
q: ASCII text, with CRLF line terminators
This works...
perl -pi -e 's/\r$//g' q
file p q
p: ASCII text
q: ASCII text
- Parv
--
A programmer, budding Unix system administrator, and amateur photographer
seeks employment: http://www103.pair.com/parv/work/
More information about the freebsd-questions
mailing list