I came across a shell script that contains a statement like,
if [ $val -eq $? ]
What does $? mean here?
$?
This is the value of the exit status of the previous command. This is 0 in case of success.
0