replacing two EOL chars by one

Greg Menke gregm-news at toadmail.com
Sat Dec 20 20:13:39 EST 2003


xah at xahlee.org (Xah Lee) writes:

> i have a bunch of java files that has spaced-out formatting that i
> want to get rid of. I want to replace two end of line characters by
> one end of line characters. The files in question is unix, and i'm
> also working under unix, so i did:

Have a look at tr and sed.  tr is also a handy tool for fixing Windows
cr/lf madness.

Gregm




More information about the Python-list mailing list