rpm -qi bash
Code:
Name : bash Relocations: /usr
Version : 3.0 Vendor: Red Hat, Inc.
Release : 19.3 Build Date: Wed 12 Apr 2006 10:01:32 PM CEST
Install Date: Sat 16 Sep 2006 01:13:23 PM CEST Build Host: hs20-bc1-6.build.redhat.com
Group : System Environment/Shells Source RPM: bash-3.0-19.3.src.rpm
Size : 5112724 License: GPL
Signature : DSA/SHA1, Thu 01 Jun 2006 07:27:07 PM CEST, Key ID 219180cddb42a60e
Packager : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Summary : The GNU Bourne Again shell (bash).
Description :
The GNU project Bourne Again shell (bash) is a shell or command
language interpreter that is compatible with the Bourne shell
(sh). Bash incorporates useful features from the Korn shell (ksh) and
the C shell (csh) and most sh scripts can be run by bash without
modification. Bash is the default shell for Red Hat Linux.
hier die .bash_profile
Code:
################################################
# special profile for HSG root users
################################################################################
# declare functions # ATTENTION: defines shell history
function updatePATH # extend path $1 with $2, $3, ...
{ #
set +u # no error on unset vars
typeset pathVAR # declare local variables
typeset pathVAL
eval pathVAL=\$${1} # copy value of $1 to pathVAL
pathVAR=${1} # remember $1
shift
while [[ "$1" != "" ]]
do # append to pathVAL if necessary
echo ":$pathVAL:" | /bin/grep -q ":${1}:" \
|| pathVAL=${pathVAL}:$1
shift
done
eval $pathVAR=${pathVAL} # update original PATH variable
}
################################################################################
# Set up the search paths:
[[ -f /etc/PATH ]] \
&& PATH=$(cat /etc/PATH) \
|| PATH="/bin"
updatePATH PATH /bin /sbin /usr/bin /usr/sbin /etc /usr/local/bin /usr/bin/X11
################################################################################
# set and export subsequent variables
set -a set and export subsequent variables
SHELL=$(grep "^$LOGNAME:" /etc/passwd | awk -F: '{print $7}')
SHELL=${SHELL:-/bin/bash} # set default SHELL
[[ ! -x $SHELL ]] && SHELL=/bin/bash
BASH_ENV=~/.bashrc
HOSTNAME=$(hostname)
HOSTNAME=${HOSTNAME%%.*}
DISPLAY=${DISPLAY:-$HOSTNAME:0.0}
HISTFILEdir=~/.HISTORY
[[ ! -d $HISTFILEdir ]] && mkdir -p $HISTFILEdir
HISTSIZE=1024
DISPhost=${DISPLAY%%:*}
Xhost=${Xhost:-$DISPhost} ; export Xhost
if [[ "$Xhost" = "localhost" ]] && [[ -n $SSH_CLIENT ]]
then
XhostIP=${SSH_CLIENT%% *}
XhostIP=${XhostIP##*:}
Xhost=$(nslookup $XhostIP 2>/dev/null | grep -i name | tail -1 | awk '{print $NF}' | sed -e 's/\..*//')
fi
EDITOR=/bin/vi # set default editor
[[ ! -x $EDITOR ]] && EDITOR=/usr/bin/vi
FCEDIT=$EDITOR
VISUAL=$EDITOR
# evtl. use vim
[[ -x /usr/local/bin/vim ]] && EDITOR=/usr/local/bin/vim
[[ -x /usr/bin/vim ]] && EDITOR=/usr/bin/vim
[ -f /usr/bin/less ] && PAGER="/usr/bin/less"
LESS="-iMX -j2 -z-2"
LESSCHARSET=latin1
LC_COLLATE=C # set default language
LANG=C
set +a
################################################################################
# MAIN body
set +u # no error on unset vars
umask 022
[[ -f ~/.bashrc ]] && . ~/.bashrc # source aliases and functions
################################################################################
Lesezeichen