View Single Post
  #29 (permalink)  
Old 06-08-2007, 02:29 PM
dhickey dhickey is offline
Intermediate Member
 
Posts: 23
Default

I appreciate all your help. I have been searching the internet and looking through my manuals on how to change the order of the PATH.

The say to look at my /etc/profile file and this is it's contents.

[root@mail etc]# cat profile
# /etc/profile

# System wide environment and startup programs, for login setup
# Functions and aliases go in /etc/bashrc

pathmunge () {
if ! echo $PATH | /bin/egrep -q "(^|$1($|" ; then
if [ "$2" = "after" ] ; then
PATH=$PATH:$1
else
PATH=$1:$PATH
fi
fi
}

# Path manipulation
if [ `id -u` = 0 ]; then
pathmunge /sbin
pathmunge /usr/sbin
pathmunge /usr/local/sbin
fi

pathmunge /usr/X11R6/bin after


# No core files by default
ulimit -S -c 0 > /dev/null 2>&1

USER="`id -un`"
LOGNAME=$USER
MAIL="/var/spool/mail/$USER"

HOSTNAME=`/bin/hostname`
HISTSIZE=1000

if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
INPUTRC=/etc/inputrc
fi

export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC

for i in /etc/profile.d/*.sh ; do
if [ -r "$i" ]; then
. $i
fi
done

unset i
unset pathmunge
[root@mail etc]#

I see where the variable $1 is moved either before or after the PATH, but I am not sure where they get $1. I am, as you can tell, not very programming literate.

Everyone has been very helpful, if someone could post a link or let me know how to change the order in the path I would appreciate it.

Thanks

Don
Reply With Quote