Find and Replace a string in a textfile within multiple folders

/ Published in: Perl
Save to your folder(s)

I had a string within multiple files which were also within multiple folders that I wanted to replace

Copy this code and paste it in your HTML
  1. grep -rl target_string . | xargs perl -pi~ -e 's/target_string/replacement_string/g'

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.