> There has been considerable recent discussion on the redhat-list
> regarding path setting in Red Hat Linux and therefore in bash, their
> default shell. The discussion centers around the common event of
> multiple instances of the same directory(s) within path entries, flowing
> in part from multiple invocations of bash startup files. A common work
> around is conditional appendages to PATH, based on echo | grep tests. Some
> discussants find this inelegant and seek a better way to do this.
This is so trivial to do with shell functions that it's not worth
putting into the shell proper. Look at examples/functions/pathfuncs
in the bash distribution for guidance.
The `case' statement and the [[...]] conditional command are your friends.
There should be no need to resort to `echo | grep' tests.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)
Chet Ramey, CWRU chet@po.CWRU.Edu http://cnswww.cns.cwru.edu/~chet/