Mail Archives: djgpp/2000/08/26/09:17:00.1
Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de> wrote in message
news:8o34n7$cvu$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE...
> David <nobody AT bogus DOT com> wrote:
> > Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de> wrote in message
> > news:8o2l25$5rr$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE...
> [...]
> >> You don't need '-a' to do that. 'which grep' will tell you exactly the
> >> version of grep you'll be using, and nothing else. That's how the tool
> >> came to its name. 'which -a' is for when you want to know what
> >> alternative versions of a command there are.
>
> > What I really wanted to was find all the versions of various utilities
with
> > identical names (like grep, masm, cl, gcc, etc.) on my machine and find
how
> > I needed to change my path to call the right one.
>
> Changing the PATH generally won't help, in that respect. No matter how
> you set it, you'll almost invariably have the wrong version of some
> program found first.
>
> If you need a particular set of utilities, you'll either have to
> modify your path dynamically (like: remove DJGPP from the PATH, and
> add Borland C++ instead of it, when you switch from one to the other),
> or set up a global "what I want executed" directory with links to the
> actual programs in it, and put that first in the path.
Thats exactly what I do. If I get unexplained behavior during a make, I try
to rearrange my path using batch files. The WHICH utility is a convenience,
and the "-a" option is an extra convenience.
- Raw text -