John Plocher wrote: > Joseph Kowalski wrote: >>> That combination is impossible. >> Uh, unless I'm missing something, the following, very elaborate and >> convoluted path >> would provide the requested semantic. >> >> PATH=/usr/bin >> >> I must be missing something. > > #include <dead_horse.h> > > Postulate the following directory layout based on what this > project proposes: > > A) /usr/bin/ls a Posix/SUS Solaris utility > B) /usr/bin/gtar a GNU utility provided by this project > > Also presume that there is a directory that contains a different > version of the FSF's binutils: > > C) /opt/csw/bin/gtar a different version of the FSF's GNU utility > > Note that there are also "conflicting" executable names on the system: > > D) /usr/gnu/bin/ls, > E) /usr/gnu/bin/gtar (same as B) > F) /opt/csw/bin/ls > > How can I set my PATH such that > ls resolves to A > and > gtar resolves to C? > > PATH=? > gives me A and C > > > My choices seem to be: > > PATH=/usr/bin:... > gives me A and B - I lose the csw gtar > > PATH=/usr/gnu/bin:/usr/bin:... > gives me D and E (aka B) - I lose the Solaris ls AND the csw gtar > > PATH=/opt/csw/bin:/usr/bin:... > gives me F and C - I lose the Solaris ls > > > -John
Note that you can make exactly the same argument if you want the Solaris version of m4 but the gnu version of ls, regardless of where we place non-conflicting names. If you want to pick individual binaries out of directories, use symbolic links: % mkdir ~/bin % ln -s /opt/csw/bin/gtar ~/bin % PATH=~/bin:/usr/bin:... It's very simple. PATH=/usr/bin should work for most people. Selecting alternate environments can be accomplished by placing those environments ahead of /usr/bin. Those wishing "Dim Sum" binary selection are encouraged to use symbolic links in their own personal bin directory. Richards' proposal to create a /usr/sunos containing only "solaris" commands might be interesting but that is not this project. I can foresee interesting arguments as to what it might contain, and what might be excluded. - Bart -- Bart Smaalders Solaris Kernel Performance barts at cyber.eng.sun.com http://blogs.sun.com/barts
