Posted By

chrisaiv on 03/30/08


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


Find and Replace a string in a textfile within multiple folders

 / Published in: Perl

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

  1. grep -rl target_string . | xargs perl -pi~ -e 's/target_string/replacement_string/g'

Report this snippet  

You need to login to post a comment.