Perl Oneliner: Recursive Search and Replace
February 15th, 2007
No comments
I like Perl and I use it every day. It’s cool to make a simple scripts in one line to do some routine work. For example, my first Perl oneliner formats Apache log to be easy readable. Here is another good example of Perl onliner (it isn’t my actually). It makes a recursive search and replacement:
Perl -p -i -e ‘s/oldstring/newstring/g’ `grep -ril oldstring *`
[via About: Perl]




