> Doesn't it make more sense to do a test, then just redirect error > output?
That creates a race condition (the directory could be deleted between test and cd). Note that the rest of the code is only run if cd was successful. Also, test may be an external program. Regards, Peter
