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
  • 19,146
  • 23
  • 122
  • 193

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
  • 216,767
  • 17
  • 275
  • 509