Toggle navigation
Home
Latest pastes
FAQ
Random
BitBin is shutting down!
Register
Login
Change string in many files at once and MUCH more.
SUBMITTED BY:
Guest
DATE:
Feb. 25, 2014, 3:07 a.m.
FORMAT:
Text only
SIZE:
324 Bytes
Raw
Download
Tweet
HITS:
1055
Go to comments
Report
Change string in many files at once and more.
Find all files that contain string XXX in them, change the string from XXX to YYY, make a backup copy of the file and save a list of files changed in /tmp/fileschanged.
find . -type f -exec grep -l XXX {} \;|tee /tmp/fileschanged|xargs perl -pi.bak -e 's/XXX/YYY/g'
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus