/, Perl/Change a word in many files

The below one liner will open all files in its path and change the word ‘MOO’ in any of the files to the word ‘BOO’.

find . -type f | xargs /usr/iw-home/iw-perl/bin/iwperl -i -p -e 's/MOO/BOO/g;'

This script has only been lightly tested so please make a backup of your files before running this!

By |2008-09-27T14:23:24+00:00September 27th, 2008|Magic One Liners, Perl|0 Comments

About the Author: