Useful sed command

8 June 2009 15:29

Posting this more as a reminder to myself than anything else, but, if you need to replace all instances of the word old in a file with the word new this command is really handy!

sed -i 's/old/new/g' file.txt

Filed: Technology // Tagged: , , ,

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

You can leave a comment or leave a trackback from your own site.

Leave a Reply

 
What's ianteresting?   •   Twitter   •   About   •   Contact
©2012 Ian Winter. All Rights Reserved.   •   Powered by WordPress   •   Hosted at Memset