>Hi,
>I would like to get rid of the occurences of ^M^J charachter combination
>(carriage return & line feed combination)in my file.
>That is I want to get rid of all the occurences of \015\012
>For Example, the following file
>1234^M
>456
>^M
>789
>should becom
>123456
>789
>Any help is greatly appreciated.
>Thanks in advance,,,,,Murty
use tr, 'man tr'
to delete characters use the '-d' switch;
tr -d '\15\12' <sourcefilename >destinationfilename
that will put the whole file all together in one line.
the line should at least be terminated with a single LF;
echo >>destinationfilename
if you just want to remove the CR characters (to get
a UNIX compatible text file with no ^M's showing up);
tr -d '\15' <sourcefilename >destinationfilename
BTW: I have a port of BSD 'tr' for MSDOS available on my
website. See the TOOLS page.
byefrom
--
: ${L:-aura} # http://lf.8k.com:80
: # http://lf.1accesshost.com