Find and replace a word from a file

Sometimes, you might want to find and replace a bunch of word from a file and you do not actually needed a word editor such as vi, pico, nano or emacs to open and modify it.

From Linux, you could directly using perl to replace them.
perl -pi -e ’s/wordToFind/replaceWithThisWord/g’ *.fileExtension

For example, you have all word linux want to replace with mickgenie, you may use the command as below.

perl -pi -e ’s/linux/mickgenie/g’ bogo.txt