Linux Journal | Linux Tips
Bits and pieces of Linux tips, tricks and problem resolutions
Sunday, April 17, 2005
Search and replace certain words in file using Perl examples
perl -e "s/old_string/new_string/g;" -pi.save $(find DirectoryName -type f)
perl -e "s/<\!--#include virtual=\".\/menu.html\" -->//g;" -pi.bak $(find . -type f)
perl -e "s/shtml/php/g;" -pi.bak $(find . -type f)
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment