in reply to Re: How to delete ^M character using regex
in thread How to delete ^M character using regex
Just wondering if this is not platform specific. If you bring windows text files to Un*x (using your USB key and not FTP ascii mode for ex.), it's probably what you need (and what the OP needed :). But in general (supposing an ASCII world) why not spell in full i.e s/\015//g; On the mac, line-endings are ^M and that's the \n escape, isn't?, so my guess is that \r will be different...but I have no mac (yet) and cannot prove it ;)
hth --steph% stephan@armen (/esc) % % cat -evnt hi1; echo; perl -lpe 's/\015//g' hi1 | cat -evnt 1 hello world^M wake up^M please$ 2 and be good$ 1 hello world wake up please$ 2 and be good$
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: How to delete ^M character using regex
by rinceWind (Monsignor) on Dec 21, 2006 at 15:35 UTC |