I just discovered a knowledge deficiency on my part that
I can't seem to resolve.

        If one writes a loop of the following form:

#!/usr/local/bin/bash 
ls -LF |grep \/ >/tmp/files
while read dirname; do
cd $dirname
#Do whatever commands to be repeated in each directory.
done < /tmp/files

        This works quite well but it is shall we say sloppy
because it creates a file that then must be cleaned up and its
name needs to be made unique, etc.

        The standard output of the `ls -LF |grep \/` command
needs to look like a file and all should be well. I thought the
< redirection would pickup the standard output.

Thanks for ideas.

Martin McCormick
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Reply via email to