From a31518bc7305075981e46a88412be6bd9c5998cb Mon Sep 17 00:00:00 2001 From: daryl Date: Mon, 4 Jul 2022 09:23:11 +0930 Subject: [PATCH] Update 'bash/associative_array.bash' --- bash/associative_array.bash | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/bash/associative_array.bash b/bash/associative_array.bash index bf3eb03..e4ce184 100644 --- a/bash/associative_array.bash +++ b/bash/associative_array.bash @@ -12,8 +12,16 @@ array[repo_three]=false # The key is accessed using the exclamation point for i in "${!array[@]}" do - echo "key : $i" + echo "key: $i" if ${array[$i]}; then echo "$i is true" fi -done \ No newline at end of file +done + +# Output will be: +# +# key: repo_one +# repo_one is true +# key: repo_two +# repo_one is true +# key: repo_three