Hi Danny, > Thanks for the link. I will check it out. Right now, I have an > issue when performing a "CD" command in a for loop. When there is no > directory ( say qatest ), the loops goes back to the very top of the > parent directory and keeps building (looping endlessly) until the > machine runs out of memory!
Just a top-of-my-head answer... > I want to perform a check if the CD failed, ...but your for-loop seems to be one command that gets executed by the shell. Can't you do exactly what you said, check if the CD failed? I assume CD returns an exit code you could check? Or even better, before CD'ing, test if the subdir exists (test -d ?) and if not break/continue/not_sure, to skip to the next subdir. Or fix the SUBDIR variable to only included existing subdirs. -- Joost Leeuwesteijn _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
