N Ngân Lam New member Jan 12, 2022 #1 What is $? In Shell? 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.
What is $? In Shell? 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.