The Wanderer wrote: > What I was doing at the time, so far as I remember, was: > > for i in `ls path/to/directory1/ path/to/directory2/` ; do ls -l $i && > <complex operation I don't care to reproduce here> $i ; done > > but that didn't work because the filename printed by the subshell did > not exist in the present directory.
Would this have worked there? I think it is basically the same thing. But avoids the extra ls process and uses the shell directly to list the directory. for i in path/to/directory1/* path/to/directory2/* ; do ls -l $i && <complex operation> $i done > If I were attempting to find in the hierarchy beginning at the curent > directory, that would be fine. However, it is far more common for me to > want to find in some hierarchy other than the one I'm currently at the > top of, How about this? find $PWD/foo/* $PWD/bar/* Or: find $PWD/{foo,bar}/* Bob _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils