[ale] FAQ alert: Losing ^M

Amarendra Godbole (Intl Vendor) v-amarg at microsoft.com
Wed May 8 00:05:56 EDT 2002


> What's wrong with 'cat $file | tr -d \\15 > ~tmp && mv ~tmp $file'?

Nothing. nth way to do things, okay here is my (n+1)th way, using sed
(p0ssibly more efficient too) ;-)):

sed 's/^V^M$//g' dosfile.txt >unixfile

The 'ctrl-V ctrl-M' sequence is used to obtain the ctrl-M character.

Cheers,
--amar

--
Amarendra A. Godbole / Microsoft ``Services For UNIX'' / These opinions
are _MINE_.
If anything can go wrong, _FIX_ it. (To hell with MURPHY)



---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be
sent to listmaster at ale dot org.






More information about the Ale mailing list