[Ilugc] RE: ilugc Digest

  • From: andyetitmoves@xxxxxxxxx (Ramkumar R)
  • Date: Wed Jul 13 14:30:45 2005

Perl has in built in place text replacement facility:

$ find <folder> -type f -print0 | \
xargs perl -pi -e 's/<find>/<replace>/g'

If you need a backup of the files with name .bak use
$ find <folder> -type f -print0 | \
xargs perl -pi.bak -e 's/<find>/<replace>/g'


i think it should have been xargs -0 perl...

-- 
The day Microsoft makes something that doesn't suck
is probably the day they start making vacuum cleaners.
                                               -Ernst Jan Plugge

Other related posts: