10/07/2008

Perl Tip: Converting DOS to UNIX file format

It is as easy as changing all \r\n characters with \n to convert them to UNIX format. So, command line wise, this is all you have to do:
perl -pi -e 's/\r\n/\n/;' *.txt

No comments: