Re: [vox-tech] bash, short circuit logic, and errexit
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [vox-tech] bash, short circuit logic, and errexit
On 1/18/08, Bryan Richter <bryan.richter@gmail.com> wrote:
> Does everyone agree that the following script shouldn't last forever?
> And if you agree, does it last forever nonetheless?
>
> ----------
> #!/bin/bash
>
> set -e
>
> false && false;
The man page states(for set -e)
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 !.
So, no, your script shouldn't exit.
-Steve
_______________________________________________
vox-tech mailing list
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech
|