I came across a shell script that contains a statement like,
if [ $val -eq $? ]
What does $? mean here?
$?
$# = number of arguments. Answer is 3.
$#
3
$@ = what parameters were passed. Answer is 1 2 3.
$@
1 2 3
$? = was last command successful. Answer is 0 which means 'yes'.
0