[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: make

From: Leeuwesteijn,Joost
Subject: RE: make
Date: Fri, 5 May 2006 08:42:06 +0200

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

Joost Leeuwesteijn

reply via email to

[Prev in Thread] Current Thread [Next in Thread]