[gPXE-devel] [PATCH 2/2] [util] Hide an expected error from which
Piotr Jaroszyński
p.jaroszynski at gmail.com
Thu Apr 1 09:16:37 EDT 2010
2010/4/1 Stefan Hajnoczi <stefanha at gmail.com>:
> 2010/3/29 Piotr Jaroszyński <p.jaroszynski at gmail.com>:
>> # There should either be mkisofs or the compatible genisoimage program
>> -mkisofs=`which mkisofs genisoimage | head -n1`
>> +mkisofs=`which mkisofs genisoimage 2>/dev/null | head -n1`
>
> No error is reported when the program cannot be found (i.e. 'which
> asdf' is silent). So if which does report an error, it's probably
> something the user should know about. That was my reasoning for not
> supressing stderr.
>
> Have you hit a noisy error message that should be supressed?
Hmm every box i have access to has which 2.20 and it does in fact
report an error in that case.
$ which foo
/usr/bin/which: no foo in (...)
I use bash which doesn't have a "which" builtin, maybe you use a shell
that does?
--
Best Regards,
Piotr Jaroszyński
More information about the gPXE-devel
mailing list