Skip to content

Commit 92ca97b

Browse files
committed
Use for loop in example with multiple values
1 parent 62aed3d commit 92ca97b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

README.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -308,10 +308,8 @@ else
308308
echo "--long-option-with-argument was not given"
309309
fi
310310

311-
i=0
312-
while [[ $i -lt ${args[<argument-with-multiple-values>,#]} ]] ; do
311+
for (( i=0 ; i < args[<argument-with-multiple-values>,#] ; i++ )); do
313312
echo "$i: ${args[<argument-with-multiple-values>,$i]}"
314-
i=$[$i+1]
315313
done
316314
```
317315

0 commit comments

Comments
 (0)