Published in: Perl
I had a string within multiple files which were also within multiple folders that I wanted to replace
grep -rl target_string . | xargs perl -pi~ -e 's/target_string/replacement_string/g'
You need to login to post a comment.
Learning Perl
In this smooth, carefully paced course, a leading Perl trainer teaches you to program in the language that threatens to make C, sed, awk, and the Unix shell obsolete for many tasks. This book is the "official" guide for both formal (classroom) and informal learning. It is fully accessible to the novice programmer.
chrisaiv on 03/30/08
1 person has marked this snippet as a favorite
Published in: Perl
I had a string within multiple files which were also within multiple folders that I wanted to replace
grep -rl target_string . | xargs perl -pi~ -e 's/target_string/replacement_string/g'
You need to login to post a comment.