"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:
Post a Comment