I always seem to misplace these…
find . -name "*.rb" -exec sed 's/oldstring/newstring' {} \;
find . -name "*.yml" | xargs perl -pi~ -e 's/oldstring/newstring/g;'
Essentially they do the same thing, the first uses sed, the second uses Perl. Watch out what you’re doing with these! If you use find . -type f in a directory managed by Subversion, prepare for some headaches.
0 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.