I still remember the first time that one bit me: "[ -e path]" fails if path is a dead symlink. There are other pitfalls testing symlinks. Some idioms I use:
Does path exist? [ -e path ] || [ -L path ] Is path really a regular file? [ -f path ] && [ ! -L path ] A directory? [ -d path ] && [ ! -d path ] -- James Ronald Lovell <ron163...@gmail.com> Huntsville, AL, USA A distributed system is one in which the failure of a computer you didn't even know existed can render your own computer unusable. -Leslie Lamport