Apache/Perl question
Tom Metro
blu at vl.com
Fri Aug 19 18:02:34 EDT 2005
Ronny Serrano wrote:
> Anyone know of a good freeware editor that would convert a windows
> notepad formated text file to unix/linux format.
If you are planning to continue editing on Windows and deploying on
Linux, EditPlus (http://www.editplus.com/) is a decent GUI editor that
support UNIX and Mac line endings in addition to MS-DOS. It's freeware,
but very cheap.
John Chambers wrote:
> Are you sure that will handle a notepad-format file? Those
> have some funny things in addition to the \r\n terminators.
> At least they used to.
Notepad has always produced plain text. Depending on what characters you
use in your document, though, you might see some high-ASCII.
> To just munge the line terminators, I've long used a tiny
> perl script:
>
> #!/usr/bin/perl -pi.dos
> s/\r\n/\n/g;
perl -i.bak -pe 'tr/\r//d'
will also do the trick.
-Tom
--
Tom Metro
Venture Logic, Newton, MA, USA
"Enterprise solutions through open source."
Professional Profile: https://www.linkedin.com/e/fps/3452158/
More information about the Discuss
mailing list