[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Documentation discrepancy
From: |
Mitar |
Subject: |
Documentation discrepancy |
Date: |
Thu, 21 May 2009 11:55:55 +0200 |
Hi!
I have found a discrepancy between documentation (man page) and
behavior of Bash under -e switch. In documentation it is written:
The shell does not exit if the command that fails is part of the
command list immediately following a while or until keyword, part of
the test in an if statement, part of a && or || list, or if the
command's return value is being inverted via !.
And it is true, this does not exit:
#!/bin/bash -e
echo "Before"
false && false
echo "After"
but strange is that this does:
#!/bin/bash -e
echo "Before"
false || false
echo "After"
Why is that? Is this a bug? A documentation discrepancy?
I am running GNU bash, version 3.2.17(1)-release (i386-apple-darwin9.0).
Mitar
- Documentation discrepancy,
Mitar <=