Hello guys, i hope you can help me..
Taking for granted the fact that '0' means success and '1' means failure (in bash environment), why this code
1 2 3 4
|
(( 0 && 1 ))
echo $? # 1
|
echoes 1 as exit status?..
I mean, the result of the logical operation is 0 (because true AND false is always false), in fact
1 2
|
let "num = (( 0 && 1 ))"
echo $num # 0
|
but why the exit status is 1?
same for
1 2
|
let "num = (( 0 && 1 ))"
echo $? # 1
|
Thank you all in advice.
Last edited on
Last edited on