Tuesday, June 7, 2005

perl -pi -e 's/\r//g'

Converting DOS/MAC text files to UNIX format:

perl -pi -e 's/\r//g' [filename]

1 comment:

  1. Don't do that on a mac file or you'll lose the newlines.. Do 's/\r/\n/g' for mac files.
    I think.

    ReplyDelete