|
|
|
|
|
by pdkl95
3882 days ago
|
|
> invoking another shell That wasn't a subshell - $(( )) is Arithmetic Expansion. (you may be thinking of $( ) for Command Substitution) $ echo $BASH_SUBSHELL $((BASH_SUBSHELL)) $(echo $BASH_SUBSHELL)
0 0 1
Now, using the result of a boolean is a bit strange; I would have used your math with the modern expansion style: # the new style allows spaces
STATE=$(( 1 - $STATE ))
|
|