1

I am trying to understand a script that was written a few years ago by someone that is no longer available here. The script references $? a few times. What is this?

P.S. Google couldn't help since it seems to strip the $? from the search term

Baruch
  • 20,590
  • 28
  • 126
  • 201

1 Answers1

7

You really should read the GNU bash manual. $? is a special parameter which

expands to the exit status of the most recently executed foreground pipeline.

Read also the advanced bash scripting guide.

Basile Starynkevitch
  • 223,805
  • 18
  • 296
  • 547