One line find and replace
find . -name '*.txt' -print0 |xargs -0 perl -pi -e 's/find/replace/g'
*.txt - files to find
find - pattern to find
replace - replace found pattern
August 12, 2008
Shell script one-line find and replace
One line find and replace
find . -name '*.txt' -print0 |xargs -0 perl -pi -e 's/find/replace/g'
*.txt - files to find
find - pattern to find
replace - replace found pattern
Comments
blog comments powered by Disqus