DrSchool Learn coding, fast.
EN AR BN CS DE EL Search

Maps / Dictionaries — Example 56

Quick explanation + ready code for: Maps / Dictionaries.

Shell Maps / Dictionaries Back to examples
Back to language
Syntax: Maps / Dictionaries in Shell. ID: #56

Code

declare -A m
m[a]=13
m[b]=14
echo "${m[a]}"

Notes

You can copy this snippet and adapt it. For advanced, add real-world inputs, edge cases, and tests.