There are tons of sites (and tons of different ways to do this) about this information.. But wanted to note this down for my personal records. If you ever wanted to search for and replace certain text in a file, you can do it with perl with this quick one liner
[code]perl -p -i -e ‘s/ORIGINAL_STRING/NEW_STRING/g’ FILE_NAME [/code]
A slightly modified version 🙂
This will search all “*.conf” files under “/home/jboss” having string “cache” and replace it with “core”.
# perl -p -i -e ‘s/cache/core/g’ `find /home/jboss -name *.conf`
Reference: http://ashok-linux-tips.blogspot.in/2010/09/searching-files-with-particular-string.html