Skip to content

Commit

Permalink
Use for loop in example with multiple values
Browse files Browse the repository at this point in the history
  • Loading branch information
openjck committed Jan 18, 2024
1 parent 62aed3d commit 1bdfd2e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,8 @@ else
echo "--long-option-with-argument was not given"
fi

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

Expand Down

0 comments on commit 1bdfd2e

Please sign in to comment.