Almost every day I need to search and replace inside a file. This is done very easily with vi but a little harder on multiple files. Take this example I want to search all the files in the current directory ending in .conf and find the word jgriffiths.org and replace it with jgriffiths.com. Perl to the rescue with this simple one line fix
perl -pi -e 's/jgriffiths.org/jgriffiths.com/g' *.conf
Yes it’s that simple.