• This $? refers to a condition, not a command. Assign to a variable to avoid it being overwritten.
  • Problematic code:
  • Correct code:
  • Rationale:
  • Exceptions:
  • Related resources: