filtering with sed

Kevin Buettner kev@primenet.com
Wed, 29 Nov 2000 14:25:08 -0700


On Nov 29,  2:07pm, 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?

Use Perl.

perl -pe 's/\r//' <infile >outfile

Kevin