On Wed, Apr 30, 2008 at 11:52:10AM -0400, Matthew R. Lee wrote: > I have a folder full of .html files and I need to go through and replace in > each and every one of them a couple of bits of info. I know I can do this > using the following from the command line: > sed 's/VV, ppp-ppp/81, 51-67/' file.html > newfile.html | mv newfile.html > file.html
If all your files are in the same folder: sed -i.bkup 'YOUR SED EXPRESSION' *.html This will edit the files in place, and keep a backup copy at filename.html.bkup so if you fouled up on your expression, you can restore sanity by rename .html.bkup .html *.html.bkup if all of your html files are named sanely. HTH, W -- Willie W. Wong [EMAIL PROTECTED] 408 Fine Hall, Department of Mathematics, Princeton University, Princeton A mathematician's reputation rests on the number of bad proofs he has given. -- gentoo-user@lists.gentoo.org mailing list