We Recommend

Learning Perl 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.


Posted By

chrisaiv on 03/30/08


Tagged


Versions (?)


Who likes this?

1 person has marked this snippet as a favorite

koncept


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.