From 92ca97bb8bb57f01245e77b926a8d35e996bc3ed Mon Sep 17 00:00:00 2001 From: John Karahalis Date: Thu, 18 Jan 2024 10:51:07 -0500 Subject: [PATCH] Use for loop in example with multiple values --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 1a081d4..c4c8973 100644 --- a/README.md +++ b/README.md @@ -308,10 +308,8 @@ else echo "--long-option-with-argument was not given" fi -i=0 -while [[ $i -lt ${args[,#]} ]] ; do +for (( i=0 ; i < args[,#] ; i++ )); do echo "$i: ${args[,$i]}" - i=$[$i+1] done ```