The Forgetful Sheep: Thoughts of just about anything

Search and replace using perl!

Sunny Walia has a great tip for Search and Replace in a linux box.

For a while now I used to use SED but Sunny suggests using perl’s inplace option (-i) to speed things up. Let me tell you this is a great time saver!.

perl -w -i -p -e "s/search_text/replace_text/g" *.txt

You can read the original article here:
Linux: How do I mass find and replace text in files under linux using perl? | Technology: Learn and Share.

You can follow any responses to this entry through the RSS 2.0 feed.