T Thành Đạt New member Jan 6, 2022 #1 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.
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.