You may want to check whether it exists (-e), can be read (-r) and that you can cd into it (-x) apart from the check you're already doing. I'd do the -e first for obvious reasons ;-)
See the docs for more details.
Hope this helps, -gjb-
In reply to Re: Checking for valid directory
by gjb
in thread Checking for valid directory
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |