Posted By

kitzelh on 10/16/09


Tagged


Versions (?)

dos2unix line ending conversion


 / Published in: Perl
 

Because sometimes "dos2unix" isn't available.

  1. perl -pi -e 's/
  2. /\n/;' filename ...

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: hacker on October 29, 2009

Hi,

unfortunately this line has no effect on non-DOS systems, see http://snipplr.com/view/20060/convert-dos-2-unix-oneliner/

Posted By: kitzelh on November 21, 2009

This line was developed on non-DOS systems. Somehow the content of my original post was corrupted. I've corrected it.

You need to login to post a comment.