sample .profile - (HP-UX 11i), works mostly with Solaris 2.7/8 and Linux



#############################################################################
#
PATH=$PATH:/usr/sbin:/sbin; export PATH 
#  Do NOT include a . in the path for root, if used with a user, put it at the end.
#
umask 022
#
#    basic aliases for ease of use and to protect system
#
alias ll="/usr/bin/ls -al"
alias mv="/usr/bin/mv -i"
alias cp="/usr/bin/cp -i"
#
if [ ! -d ~/History ]
        then
        echo "creating History directory in home account"
        mkdir ~/History
        fi
# note /userhomedir represented by ~ #
HISTFILE=/userhomedir/History/$$sh_history; export HISTFILE
#   the $$ reveals the PID of the shell
#
# HISTFILE=~/.sh_history; export HISTFILE
HISTSIZE=2048; export HISTSIZE
EDITOR=/usr/bin/vi; export EDITOR
#  
# original version:   PS1="`hostname`.`whoami`--> "
#
#   PS1=" -----------------------------------------------------
#   $(/usr/bin/whoami)@$(/usr/bin/hostname) [\$PWD]
#   
#   >--> "; export PS1
#
PS2="*-->  additional input required:  > "; export PS2
#
umask 022
#
#############################################################################

export WHMI=$(/usr/bin/whoami)
export WHST=$(/usr/bin/hostname)
export PS1="$(print '\001\015\001\0033]2; $WHMI  --->   \"$WHST\"   --->   $PWD \007
 -----------------------------------------------------
$WHMI@$WHST [$PWD]

>-->\001 ')" 

# stty erase "^H" stty kill "^U" stty intr "^C" stty eof "^D"
#  note:  on HP-UX 11 replace ^H with ^? to make backspace work, YMMV!
stty erase "^?" kill "^U" intr "^C" eof "^D"

which resize
if [ ! ? ]
        then
        echo "resize in path, executing normally..."
        resize
        fi
# NOTE:  resize will be in an X11 directory structure - YMMV #
if [ -f /usr/X11/bin/resize ]
        then
        echo "resize not in path, found at /usr/X11/bin/resize, executing ..."
        /usr/X11/bin/resize
        fi
##################################################
who am i -R | tr -d [\(-\)] | awk '{print $NF}' | grep -v :0 |  \
           awk '{print "export DISPLAY="$1 ":0"}' > /tmp/setdisplay
cat "/tmp/setdisplay"
. /tmp/setdisplay
env | grep DISPLAY`



wagoneers.com




Select pages from WAGONEERS.COM: 

the Full Size Jeep decal! © 1998-2000 John Meister
Buy this FSJ decal...   ...use PayPal to pay for it!
Make payments with PayPal, or sign up here!


a viable option to bloated and unstable code


AMSOIL synthetic lubricants and filters
(please use customer #283461)

Independent Lifetime Dealer John Meister - customer #283461 - since 1983


Shop AMAZON.com from wagoneers.com! 
Search:
Keywords:
SHOP from wagoneers.com: in Association with Amazon.com



these pages protected by US Copyright laws
John Meister copyright © 1995-2001 all rights reserved
contact john-at-wagoneers.com
"Join the fight against spam (UCE)! Eliminate spam!" Washington State has a $500 fine for "spam"
(unsolicited commercial email)!


this is an approved Family-Friendly Site       read the Bible