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
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
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]
: ^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
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