
6. 1. Environment 51
if [ −f $HOME/.bashrc ]; then
.$HOME/.bashrc
fi
;;
*)
;;
esac
$HOME/.bashrc:
#$HOME/.bashrc: local shell profile for
#−interactive non−login bash
#set xterm titlebar
case "$TERM" in
*xterm*)
PROMPT_COMMAND=’echo −e −n "\033]2;xterm@$HOSTNAME $PWD\007"’
export PROMPT_COMMAND
;;
*)
;;
esac
#set prompt depending on UID and TERM
if [ "‘id −u‘" −eq 0 ]; then
DELIM="# "
else
DELIM="$ "
fi
case "$TERM" in
linux)
export PS1="\[\033[1m\]\u\[\033[0m\]:\w "$DELIM
;;
*term)
export PS1="\[\033[1m\]\u\[\033[0m\] "$DELIM
;;
esac
#set colours and options for ’ls’
eval ‘dircolors −b /etc/default/dircolors‘
alias ls=’ls −AF −−color=auto’
#aliases for safety
alias rm=’rm −i’
alias cp=’cp −i’
alias mv=’mv −i’
/etc/csh.login:
#/etc/csh.login: system−wide shell profile for
#−login csh/tcsh
#eval default environtment
if ( −f /etc/environment && −x /usr/local/bin/readenv ) then
eval ‘/usr/local/bin/readenv /etc/environment‘
endif
#set default file permissions
umask 022
/etc/csh.cshrc:
#/etc/csh.cshrc: system−wide shell profile for
#−all csh/tcsh
#find out whether we are an interactive tcsh
#interactive tcsh: set prompt according to UID and TERM
if ( ‘id −u‘ ) then
set delim = ">"
else
set delim = "#"
endif
if ! ( $?0 && $?tcsh ) then
bindkey "\e[1˜" beginning−of−line #Home
bindkey "\e[7˜" beginning−of−line #Home rxvt
Comentarios a estos manuales