Nicola Larosa just mentioned “this little script”:http://cvs.sourceforge.net/viewcvs.py/python/python/dist/src/Tools/scripts/crlf.py?view=markup on the “EDU-SIG”:http://mail.python.org/mailman/listinfo/edu-sig mailing list to convert CRLF line endings to LF. I didn’t know pre-written scripts like these existed in the Python distribution, and hadn’t got far enough learning Python to write one of my own. Very useful ![]()
Python script to replace CRLF with LF
April 11th, 2005 | Python
1 comment so far ↓
it’s as easy as using the ‘tr’ command found on any *nix system:
cat file | tr -d ‘\r’ > file2
Leave a Comment