What am I wanting to see after make check on glibc.

S. Anthony Sequeira tony at sequeira.com
Sat Nov 8 07:50:50 PST 2003


On Sat, 08 Nov 2003 08:38:32 -0700, Kevin P. Fleming penned:

> Pascal J.Bourguignon wrote:
> 
>> % true && echo yes || echo no
>> yes
>> % false && echo yes || echo no
>> no
> 
> I've never seen that before (obviously). I also can't find anything in the
> bash documentation that states it should work that way, so I'd be
> concerned about relying on it. Can anyone show me where the docs say this
> is expected behavior?

I have been using it for years on a variety of shells.  And yes, it does
work, and no I would not expect it not to work.  It is shorthand for
(untested pseudocode)

if [ $? = 0 ]
then
  echo yes
else
  echo no
fi

Cheers
-- 
Tony




More information about the lfs-support mailing list