Michael Bovee <[EMAIL PROTECTED]> writes:

> <echo $PATH> returns the following info -- (linebreaks chosen for
> clarity, I hope)
> 
> 
> /usr/local/us/bin:/usr/local/qt/bin:/usr/local/us/bin:
> /usr/local/us/bin:/usr/local/qt/bin:/usr/local/us/bin:
> /usr/local/us/bin:/usr/local/qt/bin:/usr/local/us/bin:
> /usr/local/us/bin:/usr/local/qt/bin:/usr/local/us/bin:
> /usr/local/us/bin:/usr/local/qt/bin:/usr/local/us/bin:
> /usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games/bin:
> /usr/games:/opt/gnome/bin:/opt/ked2/bin:.:/opt/gnome/bin:
> /local/qmake/bin:/usr/local/tmake/bin:/local/qmake/bin:
> /usr/local/tmake/bin:/local/qmake/bin:/usr/local/tmake/bin:
> local/qmake/bin:/usr/local/tmake/bin:/local/qmake/bin:
> /usr/local/tmake/bin

You might want to stick something like this at the end of your
.profile:

  PATH=`perl -e 'print join ":", grep {-d && !$d{$_}++} split /:/, $ENV{'PATH'}'`


This will clean up your PATH (it removes duplicates but also preserves
the original order).

(the same thing works well for other : delimited variables, like for
example MANPATH)


Regards,

--kevin
-- 
Kevin D. Clark ([EMAIL PROTECTED])
ADVERTISEMENT:  On Sunday May 5th, I'm riding my bicycle 100 miles
in the American Diabetes Association's Tour de Cure ride.  If you're
interested in sponsoring me, please send me email.


*****************************************************************
To unsubscribe from this list, send mail to [EMAIL PROTECTED]
with the text 'unsubscribe gnhlug' in the message body.
*****************************************************************

Reply via email to