<<< Date Index >>>     <<< Thread Index >>>

Re: when using `which` send errors to /dev/null



* On 2007.05.24, in <20070524143918.GA8634@xxxxxxxxxxxxxxx>,
*       "Ralf Wildenhues" <wildenhues@xxxxxxxxxxxxxxx> wrote: 
> 
> Of course Vincent's remarks about $PATH_SEPARATOR is good.

Traditional Bourne shells (of which a System V shell is represetntative;
and this doesn't include only Solaris but also HP/Digital and IRIX) do
not support options to the read builtin.  You can use IFS for a "read
-d" lookalike.  I use IFS in my own which command, but I have doubts
about its portability ever since it much hoopla was made in the early
90s about security threats involving IFS, and it was altered in many
shells, sometimes in differing ways.

PATH_SEPARATOR does not exist in a Bourne shell.  It may be POSIX, but
only a few shells are indeed POSIX; whereas the convention for calling a
shell script does not specify POSIX shells, only /bin/sh.

That said (or even unsaid) I think this conversation has passed the end
of its usefulness -- we're not reimplmenting autoconf, we don't need
a rock-solid which, we just need to locate some programs in a short
script in a way that works for all users of mutt whom we can identify.
Anything that does that is a complete solution.  At this point we have a
lot of complete solutions available.

-- 
 -D.    dgc@xxxxxxxxxxxx, NSIT    University of Chicago