A Alvin Le Member Jan 12, 2022 #1 What does $? Do in Bash? Answer $? expands to the exit status of the most recently executed foreground pipeline. See the Special Parameters section of the Bash manual. In simpler terms, it’s the exit status of the last command.
What does $? Do in Bash? Answer $? expands to the exit status of the most recently executed foreground pipeline. See the Special Parameters section of the Bash manual. In simpler terms, it’s the exit status of the last command.