in reply to Which
Also, if you are using a Unix platform, you'd probably be better off using the -x (can be executed) file test rather than -e (exists).