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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

# Notate che "!" deve essere seguito da uno spazio.<br />

# !true restituisce l’errore "command not found"<br />

#<br />

# L’operatore ’!’ anteposto ad un comando richiama la cronologia dei<br />

#+ coman<strong>di</strong> <strong>di</strong> <strong>Bash</strong>.<br />

true<br />

!true<br />

# Questa volta nessun errore, ma neanche nessuna negazione.<br />

# Viene ripetuto semplicemente il comando precedente (true).<br />

# Grazie a Stéphane Chazelas e Kristopher Newsome.<br />

Cautela<br />

Alcuni co<strong>di</strong>ci <strong>di</strong> exit status hanno significati riservati e non dovrebbero quin<strong>di</strong><br />

essere usati dall’utente in uno script.<br />

Capitolo 6. Exit ed exit status<br />

61

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

Saved successfully!

Ooh no, something went wrong!