close
The Wayback Machine - https://web.archive.org/web/20221219203608/https://github.com/koalaman/shellcheck/wiki/SC1074
Skip to content
haruna edited this page May 20, 2021 · 4 revisions

ShellCheck

Each individual ShellCheck warning has its own wiki page like SC1000. Use GitHub Wiki's "Pages" feature above to find a specific one, or see Checks.

Clone this wiki locally

Did you forget the ;; after the previous case item?

Problematic code:

while getoptions f option
do
  case "${options}"
  in
  f) FTR="${ARG}"
    \?) exit
  esac
done

Correct code:

while getoptions f option
do
  case "${options}"
  in
  f) FTR="${ARG}"
    \?) exit;;
  esac
done

Rationale:

Syntax case needs ;; after the previous case item. If not, syntax error will cause.