Burn My Time

~Josh Houghtelin

Posts da categoria Perl.

Search and Replace through multiple text files in Linux

Josh Houghtelin Sem comentários

This is a super helpful perl script I came across when I needed to find and replace across multiple text files.
find . -name “*.php” |xargs perl -pi -w -e ’s/search_this_text/replace_with_this/g;’
The small script above (to be run on the command line/shell) recursively searches for all the php files and replaces “search_this_text” with “replace_with_this”. It works […]



Burn My Time © 2007.

Simple Grey theme developed by Rodrigo P. Ghedin.
Brought by Wordpress Themes

WordPressFAMFAMFAM