perl -p -i -e 's/oldstring/newstring/g' * replaces all occurrences of oldstring with newstring in all files in the current directory and makes backup copies of the original files."/>
You don't have to know Perl to use Perl. The command-line perl -p -i -e 's/oldstring/newstring/g' * replaces all occurrences of oldstring with newstring in all files in the current directory and makes backup copies of the original files.
Martin Streicher is the founder of Locomotive, an expert Rails consultancy. Formerly, he was Editor-in-Chief of Linux Magazine from 2002 to 2007. You can contact him at martin.streicher@linux-mag.com and follow him on Twitter.