I came across a shell script that contains a statement like,
if [ $val -eq $? ]
What does $? mean here?
$?
$? is the last result of an exit-status ... 0 is by default "successfull"
bash# ls *.* bash# echo $? bash# 0 bash# ls /tmp/not/existing/ bash# echo $? bash# 2