On 10/12/2012 03:36 PM, Wladimir Sidorenko wrote: > Ok, thanks. I'll notice this for the future. It's of course arguable, > whether PIPESTATUS stores a true value, since the '!' inversion > keyword gets ignored in this case. But if it was intended, than it's > ok.
Consider:
$ f() { return 2; }
$ ! f
$ echo $? ${PIPESTATUS[@]}
0 2
If PIPESTATUS included the effect of !, you would only ever be able to
see 0 or 1; but by having it be the uninverted status, you can see the
full 0-255 of the actual command prior to the inversion.
--
Eric Blake [email protected] +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
