How to make a backup + perform a search and replace on multiple files.

Using perl of coarse. It took me a second to get this to work; but its pretty easy:

perl  -pi.bak -e ‘s/string1/string2/g’

Trackback URL

No Comments on "How to make a backup + perform a search and replace on multiple files."

Hi Stranger, leave a comment:

ALLOWED XHTML TAGS:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Please leave these two fields as-is:

Protected by Invisible Defender. Showed 403 to 56,755 bad guys.

Subscribe to Comments