On Sat, 30 Nov 2002 13:45:20 +1100
Cameron Hutchison <[EMAIL PROTECTED]> wrote:

> $ find . -name "*.txt" | while read f ; do
> > cmd1 "$f"
> > cmd2 "$f"
> > cmd3 "$f"
> > done
> 
> I've found that is the easiest way to use find when you have spaces in
> filenames. Dont forget the quotes arounf $f when you use it, or you get
> the same problem when running the commands (ie appears as two args
> instead of one).

This doesn't work when you have to update a variable inside the while
loop that you want to use afterwards, it apparently runs in a subshell.

-- 
Carlos Sousa
http://vbc.dyndns.org/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to