Search This Blog

Showing posts with label lower case. Show all posts
Showing posts with label lower case. Show all posts

Tuesday, June 10, 2008

Perl. Replace text in file.

Substitute text in a file in-situ

perl -i -pe 's/1234/4321/g' filename

-i edits file in-situ.
-p loops through each filename and prints out each line.

Convert Upper case to lower case

perl -i -pe 'tr/A-Z/a-z/' x