Andrea Ganduglia wrote:
wget file_remoto
if [ $? -gt 0 ];  then
   echo "wget ha dato errore"
fi


Forse ho fatto un esempio un po' stupido, ma ho la necessita` di
capire se un file e' presente su un server remoto via http.

..e questo si farebbe utilizzando un programma per scaricarlo (tipo... mmmm... wget) e controllando poi il suo exit status! :)
Per non sprecare tempo/banda ovviamente basta limitare il size
massimo del download, cosa che wget permette di impostare se non sbaglio.


Cristian


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Rispondere a