Replace in files
A great one-liner:
perl -pi -e 's@foo@bar@g' *txt
This replaces instances of foo with bar in text files found in
the current directory.
The -pi option is a shortcut for emulating the behaviour of tools like
sed. It wraps your code in a while loop, processing the filenames
passed on the command line. For more details, see the man perlrun page.

RSS