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 A. Script aggiuntivi<br />

# **<br />

# La solita battuta che, stavolta, si è preferito non tradurre.<br />

# "Mark-One eyeball" è un’espressione militare che in<strong>di</strong>ca la<br />

#+ "visione a occhio nudo" riferita alla navigazione (navale e aerea) e che<br />

#+ rimane ancora il mezzo pià 1 sicuro rispetto alla navigazione strumentale.<br />

# ***<br />

# Più che una funzione anonima sembrerebbe una subshell.<br />

Esempio A-32. Il comando cd esteso<br />

############################################################################<br />

#<br />

# cdll<br />

# by Phil Braham<br />

#<br />

# ############################################<br />

# Latest version of this script available from<br />

# http://freshmeat.net/projects/cd/<br />

# ############################################<br />

#<br />

# .cd_new<br />

#<br />

# An enhancement of the Unix cd command<br />

#<br />

# There are unlimited stack entries and special entries. The stack<br />

# entries keep the last cd_maxhistory<br />

# <strong>di</strong>rectories that have been used. The special entries can be assigned<br />

# to commonly used <strong>di</strong>rectories.<br />

#<br />

# The special entries may be pre-assigned by setting the environment<br />

# variables CDSn or by using the -u or -U command.<br />

#<br />

# The following is a suggestion for the .profile file:<br />

#<br />

# . cdll # Set up the cd command<br />

# alias cd=’cd_new’ # Replace te cd command<br />

# cd -U # Upload pre-assigned entries for<br />

# #+ the stact and special entries<br />

# cd -D # Set non-default mode<br />

# alias @="cd_new @" # Allow @ to be used to get history<br />

#<br />

# For help type:<br />

#<br />

# cd -h or<br />

# cd -H<br />

#<br />

#<br />

############################################################################<br />

#<br />

# Version 1.2.1<br />

747

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

Saved successfully!

Ooh no, something went wrong!