search and replace strings from file

Searching and replacing strings from a file can be done with sed.

sed 's/'SEARCH_STRING'/'REPLACE_STRING'/g' filename > new_filename

Leave a Reply

Your email address will not be published. Required fields are marked *

*

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>