filtering with sed

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: JonRevierevie@home.com
Date:  
Subject: filtering with sed
Well, if you want to do it at the command line (assuming you have perl
installed), you can do:

perl -p -i.bak -e 's/\r//g' filename

which will do the removing of all ^M characers, as well as save a backup
file with the same name with a .bak at the end.

--
Jon Revie http://www.cs.ndsu.nodak.edu/~revie

"Somebody told me how frightening it was how much topsoil we
are losing each year, but I told that story around the camp-
fire and nobody got scared." - Jack Handey

On Wed, 29 Nov 2000, Don Harrop wrote:

> I've got an output file where each line ends with a ^M. I'm trying to get
> sed to filter out the ^M but cat doesn't print it. I need to encorporate
> the solution into a script file so search and replace with a text editor
> wont do the trick either.. Any ideas?
>
> Don
>
>
> ________________________________________________
> See http://PLUG.phoenix.az.us/navigator-mail.shtml if your mail doesn't post to the list quickly and you use Netscape to write mail.
>
> Plug-discuss mailing list -
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>