diff --git a/SC1060.md b/SC1060.md index 013d3de..bb0ee57 100644 --- a/SC1060.md +++ b/SC1060.md @@ -1,6 +1,29 @@ -#!/bin/sh -CPU_TARGET_FREQ=$1 -CORE=$2 -for n in {1..$CORE} -do -done \ No newline at end of file +## Can't have empty do clauses (use `true` as a no-op) + +### Problematic code: + +```sh +for i in 1 2 3; do +done +``` + +### Correct code: + +```sh +for i in 1 2 3; do + true +done +``` + +### Rationale: + +An empty `do ... done` block is not valid. +Use `true` or `:` if you need no command at all. + +### Exceptions: + +None. + +### Related resources: + +* Help by adding links to BashFAQ, StackOverflow, man pages, POSIX, etc! \ No newline at end of file