AW: Re: [Linux-Biella] File Non esiste

Alessio Re linux@bilug.linux.it
Wed, 13 Feb 2002 23:28:31 +0100


On Mercoledì, febbraio 13, 2002, at 10:23 , Luca Bertoncello wrote:

> non hai pero' capito il mio problema...
>
> Io devo eseguire una cosa SOLO se il file non c'e'. Ho quindi scritto:
>
> if test -e $file; then
> else
>   echo "non c'e'"
> fi
>
> Non mi piaceva lasciare il ramo then vuoto... Tutto li!

if [ ! -e /path/to/foo ] ; then
/usr/bin/command
else
exit 0
fi

? :-)

Ciao.