cc: [email protected]
Subject: Re: Re: [ast-users] early termination of a "find|while read" loop?
--------
> > Another alternative is
> > find ... | while read -u5 f ; do ... done 5<&0-
> >
> > This will also run faster since the shell is able to do full buffer
> > reads on file descriptor 5 since it is not shared.
>
>
> very interesting, that solves the problem as described
>
> (any particular reason for 5?)
>
No special reason for 5 and in fact you can do
find ... | while read -u$n f ; do ... done {n}<&0-
where n is any variable name and have the shell pick the file descriptor number.
David Korn
[email protected]
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users