what does '$?' mean in a shell script?

前端 未结 6 1901
抹茶落季
抹茶落季 2021-02-02 00:31

I came across a shell script that contains a statement like,

if [ $val -eq $? ]

What does $? mean here?

6条回答
  •  后悔当初
    2021-02-02 01:21

    I found that the link is very useful and is the great answer. It includes clearly expression with sample.

    enter image description here

提交回复
热议问题