What is $? In Linux shell script?

Thành Đạt

New member
What is $? In Linux shell script?
Answer
$? is a special variable in
shell that reads the exit status of the last
command executed. After a function returns,
$? gives the exit status of the last
command executed in the function.
 

Tìm kiếm

Back
Top