Created
May 16, 2017 11:54
-
-
Save antoni/cca6c4cbabc47e19a940f4a6917c8c94 to your computer and use it in GitHub Desktop.
Hashmap in Bash
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| declare -A hashmap | |
| hashmap["key"]="value" | |
| hashmap["key2"]="value2" | |
| echo "${hashmap["key"]}" | |
| for key in ${!hashmap[@]}; do echo $key; done | |
| for value in ${hashmap[@]}; do echo $value; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment