Find and Replace multiple Unix/Linux Files
Need to do some substitution on multiple files? Try this command:
find ./ -type f -exec sed -i 's/findme/replacewithme/' {} \;
1 Comment »
RSS feed for comments on this post. TrackBack URI
Leave a comment
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
January 14th, 2006 @ 12:23 am
or you could do:
perl -p -i -e ’s/findme/replacewithme/g’ filenames