Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Apache/Perl question



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/




BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org