2008年7月8日 星期二

perl one line by google

http://sial.org/howto/perl/one-liner/

# DOS to Unix text convert (example only, dos2unix much faster)
$ perl -i -pe 's/\r//g' file

# Legacy MacOS to Unix text convert
$ perl -i -pe 's/\r/\n/g' file

# Unix to DOS text convert (unix2dos much faster)
$ perl -i -pe 's/\n/\r\n/' file

沒有留言: