>a) the alias's in my .profile get lost after doing a "su"
>b) I like to see a different command prompt to remind me
Below is my "ENV" script, which is run whenever a s(sub)shell starts. It
tests for the current uid and sets the shell prompt variable PS1
accordingly. It also set my aliases.
Note that variables HOSTNAME, HOSTREL, MYLOCALE and MYCODEPAGE are set
in my .profile.
----start of ENV script (next line) -----------------
# This is is the shell initialization script pointed to by ENV.
#
if test $(id -u) = 0
then
export PS1='$LOGNAME @ $HOSTNAME($HOSTREL) $MYLOCALE.$MYCODEPAGE
$PWD #> '
else
export PS1='$LOGNAME @ $HOSTNAME($HOSTREL) $MYLOCALE.$MYCODEPAGE
$PWD $> '
fi
set -o vi
set -o logical
alias ps='ps -ef -ojobname,user,xasid=ASID -opid,ppid,stime,tty=TTY
-oargs'
alias psuid='ps -ef -opid,ppid,uid,ruid,gid,rgid -oargs'
if test X"$TERM" = "X" -o X"$TERM" = "Xdumb"
then
alias clear="printf '\f'"
else
alias clear='tput clear'
fi
------------- end of ENV sctipt (previous line)---------------
--
Peter Hunkeler
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN