Re: [gentoo-user] [OT]batch processing html files

2008-04-30 Thread Matthew R. Lee
On Wednesday 30 April 2008 12:00:13 Johann Schmitz wrote: > This should work (untested!): > > for x in $(find -name "*.htm*"); do > ~ tmp=$(mktemp); > > ~ sed 's/VV, ppp-ppp/81, 51-67/' $x > $tmp && mv $tmp $x; > > ~ rm $tmp; > done > > Matthew R. Lee schrieb: > | I have a folder full of .html

Re: [gentoo-user] [OT]batch processing html files

2008-04-30 Thread Willie Wong
On Wed, Apr 30, 2008 at 06:02:38PM +0200, Penguin Lover Alan McKinnon squawked: > On Wednesday 30 April 2008, 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

Re: [gentoo-user] [OT]batch processing html files

2008-04-30 Thread Neil Bothwick
On Wed, 30 Apr 2008 18:00:13 +0200, Johann Schmitz wrote: > sed 's/VV, ppp-ppp/81, 51-67/' $x > $tmp && mv $tmp $x; Use sed -i to save messing around with temporary files yourself. -- Neil Bothwick Lottery: A tax on people who are bad at math. signature.asc Description: PGP signature

Re: [gentoo-user] [OT]batch processing html files

2008-04-30 Thread Etaoin Shrdlu
On Wednesday 30 April 2008, 17:52, 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

Re: [gentoo-user] [OT]batch processing html files

2008-04-30 Thread Willie Wong
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/' f

Re: [gentoo-user] [OT]batch processing html files

2008-04-30 Thread Alan McKinnon
On Wednesday 30 April 2008, 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 > newfi

Re: [gentoo-user] [OT]batch processing html files

2008-04-30 Thread Johann Schmitz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 This should work (untested!): for x in $(find -name "*.htm*"); do ~ tmp=$(mktemp); ~ sed 's/VV, ppp-ppp/81, 51-67/' $x > $tmp && mv $tmp $x; ~ rm $tmp; done Matthew R. Lee schrieb: | I have a folder full of .html files and I need to go through