A shell script contains a loop structure lacking the required do keyword, causing syntax error. To mitigate this, add do after the loop condition and before the loop commands.
1
2# Noncompliant: Missing `do` keyword in the while loop.
3while [ $count -lt 10 ]
4 echo $count
5 count=$((count + 1))
6done1
2# Compliant: `do` keyword properly included in the while loop.
3while [ $count -lt 10 ]
4do
5 echo $count
6 count=$((count + 1))
7done