1 SC1058
Vidar Holen edited this page 2018-10-10 21:12:06 -07:00

Expected do.

Problematic code:

for file in *
  echo "$file"
done

Correct code:

for file in *
do
  echo "$file"
done

Rationale:

ShellCheck has found a loop that appears to be missing a do statement. In the problematic code, it was simply forgotten.

Verify that the do exists, and that it's in the correct place.

Exceptions:

None