11.04.2013 Views

Guida avanzata di scripting Bash - Portale Posta DMI

Guida avanzata di scripting Bash - Portale Posta DMI

Guida avanzata di scripting Bash - Portale Posta DMI

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

{ # Questo a proposito della semplicit�delle funzioni.<br />

echo "Questa è una funzione strana."<br />

echo "Ora usciamo dalla funzione strana."<br />

} # La <strong>di</strong>chiarazione della funzione deve precedere la sua chiamata.<br />

<strong>di</strong>vertimento ()<br />

{ # Una funzione un po’ pi complessa.<br />

i=0<br />

RIPETIZIONI=30<br />

}<br />

echo<br />

echo "Ed ora, che il <strong>di</strong>vertimento abbia inizio."<br />

echo<br />

sleep $SOLO_UN_SECONDO # Hei, aspetta un secondo!<br />

while [ $i -lt $RIPETIZIONI ]<br />

do<br />

echo "--------LE FUNZIONI--------->"<br />

echo "

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!