Home » Linux » Fedora » Find and replace in multiple files with sed

Find and replace in multiple files with sed

Nice usage of find and sed to find and replace text. I used it to update the copyright notices in my projects.

Just change the *.pl part to the file type you want.

find . -name "*.pl" -exec sed -i "s/2012/2013/g" '{}' \;

Source: Wikia

Posted in Fedora, Linux, News, Ubuntu, Xubuntu and tagged as , ,

Comments are closed.