We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b775dd2 commit a77aa76Copy full SHA for a77aa76
Introduction to Bash Scripting/II Variables in Bash Scripting.py
@@ -174,5 +174,23 @@
174
echo ${my_array[@]}
175
100 113 240 555 66 10
176
177
-*** Associative array
+*** Associative array (KAY_VALUE)
178
+ a Dictionary in python
179
+
180
+ # first declare
181
+ declare -A city_details
182
183
+ # now fill
184
+ city_details=([c_name]='NY' [Population]=1400000)
185
186
+ # or single line
187
+ declare -A city_details=([keys]=values)
188
189
+ # index using keys to return value
190
+ echo ${city_details[c_name]}
191
+ NY
192
193
+ *** Access KEYS (!)
194
+ >>>>>> echo ${!citydetails[@]}
195
+ c_nama Population
196
+"""
0 commit comments