Pages

2008-05-27

Performing search and replace operations across multiple files

"Making simple edits, such as replacing text, to multiple files is a common chore. Thankfully it is something that can easily be automated. There are several different approaches, depending upon the tools you prefer."
perl -pi.bak -e "s/Old text/New text/g" file1 file2 file3

http://www.debian-administration.org/articles/197

No comments: