Nice one liner to recursively replace all occurrences of 'foo' with 'bar' in all .html files in the current directory and below:
find . -name "*.html" -print | xargs sed -i 's/foo/bar/g'
- jim 1-28-2009 4:18 pm
back to Jim Bassett's Weblog
add a comment to this page:
Your post will be captioned "posted by anonymous,"
or you may enter a guest username below:
Line breaks work. HTML tags will be stripped.
[
home
] [
subscribe
] [
login
]
find . -name "*.html" -print | xargs sed -i 's/foo/bar/g'
- jim 1-28-2009 4:18 pm