diff --git a/SC1074.md b/SC1074.md new file mode 100644 index 0000000..649dbae --- /dev/null +++ b/SC1074.md @@ -0,0 +1,30 @@ +# Did you forget the `;;` after the previous case item? + +### Problematic code: + +```bash +while getoptions f option +do + case "${options}" + in + f) FTR="${ARG}" + \?) exit + esac +done +``` + +### Correct code: + +```bash +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. \ No newline at end of file