On 10/29/22 1:50 AM, Martin D Kealey wrote:
PS: While we're about it, can we please fix the expansion of « a/*/b/c/d/* » so it only calls readdir on a/ and each dir matching a/*/b/c/d/ and NOT call readdir on dirs matching a/*/, a/*/b/, or a/*/b/c/.
It already does this. Given $ find . -print . ./a ./a/z ./a/z/b ./a/z/b/c ./a/x ./a/x/b ./a/x/b/c ./a/x/b/c/d ./a/x/b/c/d/1 ./a/x/b/c/d/4 ./a/x/b/c/d/3 ./a/x/b/c/d/2 ./a/x/b/c/d/5 ./a/y ./a/y/b Running `echo a/*/b/c/d/*' calls opendir(2) twice: $ ./bash ./x1 opendir: a/ opendir: a/x/b/c/d a/x/b/c/d/1 a/x/b/c/d/2 a/x/b/c/d/3 a/x/b/c/d/4 a/x/b/c/d/5 -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/