On 2005-08-12 13:38, Benson Wong <[EMAIL PROTECTED]> wrote:
> I prefer:
>
> for COREFILE in `find / -type f -name core -print`
> do
>   ...
> done
>
> Wouldn't that accomplish the same thing?

More or less.  Less, when the filenames are too many.  See questions
posted on this very same list about ``too many arguments''.

The ``while read line; do stuff with $line; done'' loop doesn't suffer
from the same limitation, but is a bit more expensive in terms of the
number of spawned processes and (consequently) the time it takes to run.

_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to