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'

1 comment to perl replace text in multiple files

Leave a Reply

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