Friday, 31 July 2009

Perl one liner: lowercase a file

If you want to make a text file all lowercase, this perl one liner will do the job.

perl -i -ne 'tr/A-Z/a-z/;print;' file


The -i part modifies the file in place, so only use that if you are sure.

No comments:

Post a Comment