Script incorrectly uses == operator. For variable assignment, use single =. For equality comparison, use = or == within test brackets.
1
2# Noncompliant: Incorrect assignment using `==`.
3count==0
4while [ $count -lt 5 ]; do
5 echo $count
6 count=$((count + 1))
7done1
2# Compliant: Proper assignment using single `=`.
3count=0
4while [ $count -lt 5 ]; do
5 echo $count
6 count=$((count + 1))
7done