FILE=*.tf
if [ -f "$FILE" ]; then
> echo "$FILE exists."
> else
> echo "$FILE does not exist."
> fi
does not exist.
The directory Im running this in has a file myfile.tf
in it.
Im wondering why this isnt finding the myfile.tf
file - could it be because im using the *
asterisk wildcard ? What am I doing wrong here?
Thanks
Aucun commentaire:
Enregistrer un commentaire