FWIW...
I've worked at so many places with so many screwed up
PATH definitions that I've basically just collected
(don't laugh!) all likely PATH components from
every place I've ever worked in a list. When I start
working somewhere new I first execute my pathPreen()
function (after suitably sorting the members of
ALL_POSSIBLE_PATH_DIRS to reflect the desired precedence)
and then save the resultant PATH string in my .bashrc
for static init of my PATH thereafter at that site.
These definitions live in my .bashrc:
ALL_POSSIBLE_PATH_DIRS="
~/local/script
ARCH_DEPENDENT_LOCAL_BIN
/afs/ri/vice/bin
/bin
/etc
/etc/net
/home/loverso/local/arch/bin
/home/loverso/local/bin
/home/sun_client
~jeffc/bin
/local/bin
~loverso/local/arch/bin
~loverso/local/bin
/nfs/bin
/opt/local/bin
/opt/local/local/bin
/opt/X11/bin
/sbin
/tools/atria/bin
/u/bin
/u/mh
/u/scripts
/u/solaris-cc/bin
/usr/atria/bin
/usr/bin
/usr/bin/mh
/usr/bin/X11
/usr/ccs/gcc
/usr/etc
/usr/games
/usr/hosts
/usr/i860/bin
/usr/lang
/usr/local
/usr/local/bin
/usr/local/games
/usr/local/gnu/bin
/usr/local/mh/bin
/usr/local/netscape
/usr/local/ode/bin
/usr/local/ode/lib
/usr/local/script
/usr/local/share
/usr/local/tcl/bin
/usr/local/TeX/bin
/usr/local/X11/bin
/usr/mercury/bin
/usr/mercury/bin/solaris-2_5-sparc_elf
/usr/openwin/bin
/usr/osf/bin
/usr/sbin
/usr/ucb
/usr/X11
/usr/X11/bin
/usr/x11r5/bin
/usr/X386/bin
/usr/xpg4/bin
/u/x11r5/bin
/vobs/build/exports/bin
/vobs/build/exports/scripts
/vobs/gdb/kgdb
/vobs/mcos/ccbuild/exports/bin
." #Yes, '.' is a security risk
function pathPreen()
{
if [ -z "$ARCH" ]
then
echo ARCH envar not set
return 1
fi
RZQPATHRZQ=""
for f in $ALL_POSSIBLE_PATH_DIRS
do
f=`eval echo $f`
if [ "$f" = ARCH_DEPENDENT_LOCAL_BIN ]
then
f=~/local/bin.$ARCH
fi
if [ -d $f/. ]
then
echo "INCLUDE $f"
RZQPATHRZQ="$RZQPATHRZQ:$f"
else
echo "EXCLUDE $f"
fi
done
export PATH=$RZQPATHRZQ
}
function pathCheck()
{
for f in `echo $PATH | sed -e 's/:/ /g' `
do
echo "####" $f....
ll -d $f/.
done
}
*****************************************************************
To unsubscribe from this list, send mail to [EMAIL PROTECTED]
with the text 'unsubscribe gnhlug' in the message body.
*****************************************************************