Skip to content

Files

Latest commit

 

History

History
29 lines (20 loc) · 464 Bytes

SC1137.md

File metadata and controls

29 lines (20 loc) · 464 Bytes

Pattern: Missing parenthesis for arithmetic expression

Issue: -

Description

(( or the )) for arithmetic for ((;;)) expression do not come as a pair. Make sure to use (( )) and not ( ).

Example of incorrect code:

for (i=0; i<10; i++))
do
  echo $i
done

Example of correct code:

for ((i=0; i<10; i++))
do
  echo $i
done

Further Reading