Pierre Labastie wrote:

> First the &&: an instruction such as:
> do_this && do_that
> in bash does not fail, even  if "do_this" fails, because it is taken
> by bash as semantically identical to:
> if do_this; then do_that; fi

This is not correct because the exit status may be different:

    $ false && true ; echo $?
    1
    $ if false ; then true ; fi ; echo $?
    0

The bash  manpage section that  describes the  "if list; then  list; [
elif list; then list; ] ... [  else list; ] fi" construction says "The
exit status is  the exit status of the last  command executed, or zero
if no condition tested true.".

Regards,

Jeremy Henty
-- 
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to