• Get the Flash Player to see the slideshow.
  • Categories

  • Authors

  • Great Quotes

    Simple things should be simple. Complex things should be possible. — Larry Wall - inventor of Perl

Get in touch...

To have a chat about
your CMS needs...

Call us 0207 193 2014
or
Email us on

Change a word in many files

September 27th, 2008 by Gavin Colborne

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!

Leave a Reply

You must be logged in to post a comment.