SC1085 – ShellCheck Wiki

See this page on GitHub

Sitemap


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.


ShellCheck is a static analysis tool for shell scripts. This page is part of its documentation.