[ $var -eq $val ]
What will be the value of $?
after the above condition/test if it fails? Can I assume that it will always be 1
?
Edit: After reading answers I realized my question wasn't precise. I meant "will it be always 1
if no error occurs?".