If you have sed (stream editor) you can create a script for this.

Save as dos2unix

#!/bin/sh
sed 's/^M//' $1

Save as unix2dos

#!/bin/sh
sed 's/$/^M/' $1

You can use ctrl-v ctrl-m combination in vi to create the ^M you can't
just type it in.

chmod +x dos2unix or whatever...
syntax is:
dos2unix < dosfile > unixfile
unix2dos < unixfile > dosfile

--- Wes

On Sat, Apr 27, 2002 at 06:07:49AM +0000, [EMAIL PROTECTED] wrote:
> Hello:
> 
> Can anyone here recommend a good utility program for removing 
> the CTRL + LF characters, i.e, the "^M" characters from the 
> ends of lines in DOS text files?
> 
>...SNIP
>
> Does anyone here know of a simple way to deal with it?
> 
> Sam Heywood

Reply via email to