How to return True if only one variable of three is True in BASH?
I have three boolean variables:
a|b|c|
1 1 1 False
1 1 0 False
1 0 1 False
1 0 0 True
0 1 1 False
0 1 0 True
0 0 1 True
0 0 0 False
I need a logical expression that returt true only if one variable is true. I try with
if [[ ( $a == 1 || $b == 1 || $c == 1 ) && ( $a == 1 && $b == 1 && $c == 1 ) ]]; then
return True
fi
Thank you