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’

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.