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 />

# Change this to mo<strong>di</strong>fy the default pre- and post prompt strings. #<br />

# These only come into effect if CDL_PROMPTLEN is set. #<br />

# #<br />

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

if ${TEST} ${EUID} -eq 0<br />

then<br />

# CDL_PROMPT_PRE=${CDL_PROMPT_PRE:="$HOSTNAME@"}<br />

CDL_PROMPT_PRE=${CDL_PROMPT_PRE:="\\[\\e[01;31m\\]"} # Root is in red<br />

CDL_PROMPT_POST=${CDL_PROMPT_POST:="\\[\\e[00m\\]#"}<br />

else<br />

CDL_PROMPT_PRE=${CDL_PROMPT_PRE:="\\[\\e[01;34m\\]"} # Users in blue<br />

CDL_PROMPT_POST=${CDL_PROMPT_POST:="\\[\\e[00m\\]$"}<br />

fi<br />

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

#<br />

# cd_maxhistory defines the max number of history entries allowed.<br />

typeset -i cd_maxhistory=50<br />

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

#<br />

# cd_maxspecial defines the number of special entries.<br />

typeset -i cd_maxspecial=9<br />

#<br />

#<br />

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

#<br />

# cd_histcount defines the number of entries <strong>di</strong>splayed in the history command.<br />

typeset -i cd_histcount=9<br />

#<br />

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

export CDPath=${HOME}/<br />

# Change these to use a <strong>di</strong>fferent #<br />

#+ default path and filename #<br />

export CDFile=${CDFILE:=cdfile} # for the -u and -f commands #<br />

#<br />

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

#<br />

typeset -i cd_lchar cd_rchar cd_flchar<br />

# This is the number of chars to allow for the #<br />

cd_flchar=${FLCHAR:=75} #+ cd_flchar is used for for the @s & @h history #<br />

typeset -ax CD CDS<br />

#<br />

cd_mset="\n\tDefault mode is now set - entering cd with no parameters has the default action<br />

cd_mnset="\n\tNon-default mode is now set - entering cd with no parameters is the same as en<br />

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

:

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

Saved successfully!

Ooh no, something went wrong!