What is the use of $? In Unix?

Mỹ Duyên

New member
What is the use of $? In Unix?
Answer
The $? variable represents
the exit status of the previous command
. Exit status is a numerical value returned by every command upon its completion. As a rule, most commands return an exit status of 0 if they were successful, and 1 if they were unsuccessful.
 

Tìm kiếm

Back
Top