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.

infocmp<br />

reset<br />

clear<br />

script<br />

Capitolo 12. Filtri, programmi e coman<strong>di</strong> esterni<br />

L’esecuzione <strong>di</strong> tput cup X Y sposta il cursore alle coor<strong>di</strong>nate (X,Y) nel terminale corrente.<br />

Normalmente dovrebbe essere preceduto dal comando clear per pulire lo schermo.<br />

Si noti che stty offre una serie <strong>di</strong> coman<strong>di</strong> più potenti per il controllo <strong>di</strong> un terminale.<br />

Questo comando visualizza informazioni dettagliate sul terminale corrente. Utilizza, allo scopo, il<br />

database terminfo.<br />

bash$ infocmp<br />

# Reconstructed via infocmp from file:<br />

/usr/share/terminfo/r/rxvt<br />

rxvt|rxvt terminal emulator (X Window System),<br />

am, bce, eo, km, mir, msgr, xenl, xon,<br />

colors#8, cols#80, it#8, lines#24, pairs#64,<br />

acsc=“aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,<br />

bel=^G, blink=\E[5m, bold=\E[1m,<br />

civis=\E[?25l,<br />

clear=\E[H\E[2J, cnorm=\E[?25h, cr=^M,<br />

...<br />

Annulla i parametri del terminale e pulisce lo schermo. Come nel caso <strong>di</strong> clear, il cursore ed il<br />

prompt vengono posizionati nell’angolo in alto a sinistra dello schermo.<br />

Il comando clear cancella semplicemente lo schermo <strong>di</strong> una console o <strong>di</strong> un xterm. Il prompt e il<br />

cursore riappaiono nell’angolo superiore sinistro dello schermo o della finestra xterm. Questo<br />

comando può essere usato sia da riga <strong>di</strong> comando che in uno script. Ve<strong>di</strong> Esempio 10-25.<br />

Questa utility registra (salva in un file) tutte le <strong>di</strong>gitazioni da riga <strong>di</strong> comando eseguite dall’utente su<br />

una console o in una finestra xterm. In pratica crea una registrazione della sessione.<br />

314

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

Saved successfully!

Ooh no, something went wrong!