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.

Appen<strong>di</strong>ce G. File importanti<br />

/etc/profile<br />

/etc/bashrc<br />

file <strong>di</strong> avvio (startup)<br />

$HOME/.bash_profile<br />

$HOME/.bashrc<br />

$HOME/.bash_logout<br />

Note<br />

Questi file contengono gli alias e le variabili d’ambiente che vengono rese <strong>di</strong>sponibili a <strong>Bash</strong>, in<br />

esecuzione come shell utente, e a tutti gli script <strong>Bash</strong> invocati dopo l’inizializzazione del sistema.<br />

valori predefiniti del sistema, la maggior parte dei quali inerenti all’impostazione dell’ambiente<br />

(tutte le shell <strong>di</strong> tipo Bourne, non solo <strong>Bash</strong> 1 )<br />

funzioni e alias <strong>di</strong> sistema per <strong>Bash</strong><br />

impostazioni d’ambiente predefinite <strong>di</strong> <strong>Bash</strong> specifiche per il singolo utente. Si trova in ogni<br />

<strong>di</strong>rectory home degli utenti (è il corrispettivo locale <strong>di</strong> /etc/profile)<br />

file init <strong>Bash</strong> specifico per il singolo utente. Si trova in ogni <strong>di</strong>rectory home degli utenti (è il<br />

corrispettivo locale <strong>di</strong> /etc/bashrc). Solo le shell interattive e gli script utente leggono questo<br />

file. In Appen<strong>di</strong>ce K viene riportato un esempio <strong>di</strong> un file .bashrc.<br />

file <strong>di</strong> arresto (logout)<br />

file <strong>di</strong> istruzioni specifico dell’utente. Si trova in ogni <strong>di</strong>rectory home degli utenti. Dopo l’uscita da<br />

una shell <strong>di</strong> login (<strong>Bash</strong>), vengono eseguiti i coman<strong>di</strong> presenti in questo file.<br />

1. Questo non è valido per csh, tcsh e per tutte le altre shell non imparentate o non derivanti dalla<br />

classica shell Bourne (sh).<br />

783

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

Saved successfully!

Ooh no, something went wrong!