in reply to Re^2: Large scale search and replace with perl -i (don't grep(1))
in thread Large scale search and replace with perl -i
You don't want to do that. If 'foo' spans across one of those read blocks, then you'll miss the substitution.find . -name "*.html" -type f -print0 | perl -i -p0e \ 'BEGIN{ @ARGV = <STDIN>; chomp @ARGV; $/ = \65536 }; \ while (<>) { s/foo/bar/g; print }'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Large scale search and replace with perl -i (doh!)
by Aristotle (Chancellor) on Apr 14, 2003 at 21:07 UTC |