facelordgists
1/21/2016 - 9:55 PM

Find and replace strings inside files from the terminal

Find and replace strings inside files from the terminal

Replace strings inside files using perl

Note: -w argument enables warnings

Replace all instances of "stupid" with "awesome" in html files on the desktop

perl -pi -w -e 's/stupid/awesome/g;' ~/Desktop/*.html