Sascha Ziemann wrote:
The following code prints "a". The second false terminates the script but the first does not. set -e declare a="a"$(false) echo $a b="b"$(false) echo $b
The first operation succeeds, the second doesn't.The first operation is the "declare" command, and it works (and will seit its exit code to 0).
The second operation is a variable assignment, the status of the variable assignment is != 0.
"Workaround": - first declare a - then set a Jan