perl replace text in multiple files

perl replace text in multiple files

perl -pi -e 's~OLDTEXT~NEWTEXT~g' /path/to/filenames/*

Alternative (to avoid escaping slashes):

perl -pi -e 's|w/|with|g'

One comment

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.