Skip to content
Grische edited this page Jul 30, 2025 · 1 revision

Did you forget to move the ;; after extending this case item?

Problematic code:

case $options in
  foobar) echo foo ;; echo bar;;
  *) echo unknown option ;;
esac

Correct code:

case $options in
  foobar) echo foo ; echo bar;;
  *) echo unknown option ;;
esac

Rationale:

There should be no statements between ;; and the next case item.

Clone this wiki locally