Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: sh -e changes broke pkgsrc
tron%zhadum.org.uk@localhost said:
> Please explain why "true && false" should be different from "false &&
> true".
Hmm - one could suspect that the POSIX people did just try
to document the status quo.
A logical reason could be that the "&&" explicitely tests
for the exit status, and the intent is that "-e" does not
exit if the exit status is tested for.
> If an "AND list" in the above definition refers to "foo && var"
Yes it does. To quote xcu_chap02:
An AND-OR list is a sequence of one or more pipelines separated
by the operators "&&" and "||" .
> why would "true && false" terminate "bash".
Well, the documentation is poor, but the idea that
an explicit test for the exit status inhibits the
automatic exit makes most sense for me.
best regards
Matthias
-------------------------------------------------------------------
-------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr. Harald Bolt,
Dr. Sebastian M. Schmidt
-------------------------------------------------------------------
-------------------------------------------------------------------
Home |
Main Index |
Thread Index |
Old Index