: # .profile for ksh # $HOME/.profile is read after /etc/profile. # $HOME/.kshrc is read after $HOME/.profile. # set flags set -o vi # Set command line editing mode set -o allexport # Export ALL variables set -o ignoreeof # Dont crash out on ctrl-D # environment variables SHELL=/bin/ksh # Name of the shell TZ=PST8PDT # Time zone LOGNAME=`logname` # Keep the logname echo "Setting .profile for $LOGNAME" HOME=/u/$LOGNAME # force the $HOME directory MACHINE=`uuname -l` # Get the name of the machine # MACHINE=`hostname` # Get the name of the machine MAIL=/usr/spool/mail/$LOGNAME # Name of mail file PATH=/bin:/usr/bin:/etc:/u/bin:/usr/local/bin:$HOME/bin:. # Set the $PATH EXINIT='set ai aw sw=4 shell=/bin/ksh' # vi defaults if [ -f $HOME/.kshrc -a -r $HOME/.kshrc ] # is there a .kshrc? then ENV=$HOME/.kshrc # set ENV if there is an rc file export ENV fi # If job control is enabled, set the suspend character to ^Z (control-z): case $- in *m*) stty susp '^z' ;; esac # setup terminal type eval `tset -h -m ansi:ansi -m unknown:\?ansi -e -s -Q` echo "Terminal is $TERM" TERMCAP=/etc/termcap # Name of $TERMCAP file stty -g > $HOME/.stty # save stty settings to file # setup prompt PS1="\!> [$(logname)\@$(hostname)] [$(basename $(tty))] \$PWD => " # set the main prompt on 2 lines # default command line editor HISTFILE='.sh_hist' # Name of history file VISUAL='/bin/vi' # My favorite editor EDITOR='/bin/vi' # No dumb editors tolerated PAGER='/u/bin/less' # favorite news pager for trn # aliases and junk echo "Setting aliases for $LOGNAME" alias a=alias # I hate typing "alias" a h='fc -l' # history alias a bye=exit # logout a usu="cd /usr/spool/uucp" a ulu="cd /usr/lib/uucp" a upu="cd /usr/spool/uucppublic" a uln="cd /usr/lib/news" a usn="cd /usr/spool/news" a cls=clear # clear the screen a md=mkdir # make a directory a rd=rmdir # remove a directory a dir="lf -a" # wide directory listing # initial programs stty erase ^H echoe echok # vt220 wants "^_" I like "^H" stty kill "" # no kill character stty tab3 # hard tab character fix. cd # required for getting prompt running if [ -f $HOME/.newsrc ] then cp $HOME/.newsrc $HOME/.newsrc.sya # save news file fi /u/bin/trn -c # check for news /u/bin/frm -v -s new # Any mail? List messages. /u/bin/df4 # diskspace trap "/bin/clear; cat /etc/motd; sleep 2" 0