Here is a tiny script that I like to use for batch editing files from the shell command line: find . -iname ‘*.php’ | xargs grep ‘oldString’ -sl | xargs sed -i ‘s/oldString/newString/g’ It is a combined command that does the following: Find all files ending in ‘.php’ in the current folder or below and [...]