^M's in file

2002-01-09 Thread Joyce Harris
I have a html file ftp'd to UNIX from Win. There were no line breaks in it so I could not open it in vi because the line was to long. I opened it in pico which inserted it's own line breaks. Is there a way to put remove the ^M's in the file and insert line breaks there instead? Thanks, Joyce

Re: ^M's in file

2002-01-09 Thread William.Ampeh
Unix comes with the dos2unix and unix2dos commands (or scripts) that takes care of the ^M problem. If you do not have dos2unix, you could use sed or vi. In sed: sed 's/^M//' {infile} {outfile} where ^M is created by holding down the Ctrl and press the character v key followed by

Re: ^M's in file

2002-01-09 Thread Frank
cat file | perl -pe 's/\r//' foo should work -- Frank Booth - Consultant Parasol Solutions Limited. (www.parasolsolutions.com) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: ^M's in file

2002-01-09 Thread Tanton Gibbs
: ^M's in file Unix comes with the dos2unix and unix2dos commands (or scripts) that takes care of the ^M problem. If you do not have dos2unix, you could use sed or vi. In sed: sed 's/^M//' {infile} {outfile} where ^M is created by holding down the Ctrl and press

Re: ^M's in file

2002-01-09 Thread Elaine -HFB- Ashton
Tanton Gibbs [[EMAIL PROTECTED]] quoth: *This question is asked many times in similar forms...is there a perlfaq for *this? If not, we need to look into submitting one. http://history.perl.org/oneliners/filters/dos2unix.html e. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional