Tu as un autre test pour l'existence.
#!/bin/bash
# script plop.sh
if [ ! -e "$1" ]; then
echo "$1 n'existe pas"
elif [ -f "$1" ]; then
echo "$1 est un fichier"
elif [ -d "$1" ]; then
echo "$1 est un repertoire"
fi
Ce qui donne par exemple
(mando@polgara) (~) $ ls -l
total 20
drwx------ 2 mando mando 4096 2007-03-24 12:49 Desktop
-rw-r--r-- 1 mando mando 2351 2007-04-04 22:04 plop.cpp
-rwxr-xr-x 1 mando mando 165 2007-04-04 22:45 plop.sh
drwxr-xr-x 2 mando mando 4096 2007-03-24 13:09 themes
(mando@polgara) (~) $ ./plop.sh plop.cpp
plop.cpp est un fichier
(mando@polgara) (~) $ ./plop.sh Desktop
Desktop est un repertoire
(mando@polgara) (~) $ ./plop.sh dieu
dieu n'existe pas
Bonne chance
Au passage : oui, forcément que "dieu" n'existe pas. C'est "Dieu" qui existe.