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

S. Anthony Sequeira tony at sequeira.com
Sat Nov 8 08:40:12 PST 2003

On Sat, 08 Nov 2003 11:19:57 -0500, Bill's LFS Login penned:

> On Sat, 8 Nov 2003, S. Anthony Sequeira wrote:
>> On Sat, 08 Nov 2003 08:38:32 -0700, Kevin P. Fleming penned:
>> > Pascal J.Bourguignon wrote:
>> >
>> >><snip>
>> 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
> In the simple case you cite, yes. But in cases where multiple commands
> appear in the "then" or "else" case, the results may vary significantly
> from the results of "&&" and "||" combinations. And as Pascal pointed out,
> reversing the order of "&&" and "||" *may* alter the results because of
> the way return codes are handled with the conditional execution operaters
> vs. the "if, then, else" sequence. With the "if, then, else", the sense of
> tests, and therefore the order of the resulting execution code, can be
> altered without altering the ultimate results of the pipeline. Not true
> with the conditional operators.

I know all this, but thanks for the reminder anyway.

> Further, implied again by Pascal's post, the result code of the first
> command executed can cause inadvertant execution of commands controlled by
> the alternate case, which is not true with the "if, then, else"
> construction.

See above.


More information about the lfs-support mailing list