login
Header Space

 
 

Re: find -exec {} help

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <root@...>
Cc: David B. <incomex@...>, <misc@...>
Date: Monday, June 4, 2007 - 8:01 am

On Mon, Jun 04, 2007 at 12:30:49AM -0700, Bryan Irvine wrote:

Don't use for loops with find results, they do not scale well.
Also, beware of spaces in file.

For this kind of thing, I generally use 'while read'

find . -type f -name \*.htm -print|while read f; do sed s/old/new <"$f" >"$f.new"; done
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
find -exec {} help, David B., (Mon Jun 4, 3:04 am)
Re: find -exec {} help, Stuart Henderson, (Mon Jun 4, 5:35 am)
Re: find -exec {} help, Almir Karic, (Mon Jun 4, 4:14 am)
Re: find -exec {} help, Bryan Irvine, (Mon Jun 4, 3:30 am)
Re: find -exec {} help, Marc Espie, (Mon Jun 4, 8:01 am)
Re: find -exec {} help, Martin Schröder, (Mon Jun 4, 9:26 am)
Re: find -exec {} help, Hannah Schroeter, (Mon Jun 4, 11:28 am)
Re: find -exec {} help, Hannah Schroeter, (Mon Jun 4, 8:25 am)
Re: find -exec {} help, Marc Espie, (Mon Jun 4, 4:46 pm)
Re: find -exec {} help, Tom Van Looy, (Mon Jun 4, 12:54 pm)
Re: find -exec {} help, Hannah Schroeter, (Mon Jun 4, 4:30 pm)
Re: find -exec {} help, terry tyson, (Mon Jun 4, 5:37 pm)
Re: find -exec {} help, Hannah Schroeter, (Mon Jun 4, 6:04 pm)
Re: find -exec {} help, Almir Karic, (Mon Jun 4, 12:27 pm)
Re: find -exec {} help, Hannah Schroeter, (Mon Jun 4, 12:58 pm)
Re: find -exec {} help, Almir Karic, (Mon Jun 4, 1:49 pm)
Re: find -exec {} help, Hannah Schroeter, (Mon Jun 4, 4:32 pm)
Re: find -exec {} help, Almir Karic, (Mon Jun 4, 5:45 pm)
Re: find -exec {} help, Hannah Schroeter, (Mon Jun 4, 6:21 pm)
Re: find -exec {} help, Marc Espie, (Mon Jun 4, 6:19 pm)
Re: find -exec {} help, Almir Karic, (Tue Jun 5, 2:20 am)
Re: find -exec {} help, Antti Harri, (Mon Jun 4, 3:24 am)
speck-geostationary