On 10/05/2010 09:41 AM, Pádraig Brady wrote:
Another unrelated thing before I forget.
I didn't notice in the shellology part of the manual
that the default almquist /bin/sh on FreeBSD is noisy when using
a standard idiom for testing the presence of a program.
I'm pretty sure it's in there. Yep:
http://www.gnu.org/software/autoconf/manual/autoconf.html#File-Descriptors
For e.g.
FreeBSD-8$ colorls -d .>/dev/null 2>&1
colorls: not found
One can get around this with:
FreeBSD-8$ { colorls -d . ; }>/dev/null 2>&1
Or more commonly with a subshell (same number of forks under bash 4.1,
at any rate):
(colorls -d .) >/dev/null 2>&1
But yes, mentioning that {} works instead of a subshell might be nice,
particularly if bash ever learns some of dash's optimizations for fewer
forks.
--
Eric Blake ebl...@redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org