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

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



On Wed, May 23, 2007 at 10:55:25PM +0100, Luciano Rocha wrote:
> 
>  } 3>&2 > /dev/null 2>&1 (or 3>&2 &> /dev/null) should work instead.

Except that &> isn't posix-compliant shell syntax (it is from csh), and
isn't supported by all shells.

Also, since the redirection of {...} will enforce a subshell (at least
on some shells), requesting it explicitly by using (...) is better.

Also a conformat posix shell should have a 'type' command, and 'command -v'
which are builtins that report the location of programs.

        David

-- 
David Laight: david@xxxxxxxxx