Created
September 6, 2024 18:23
-
-
Save froi/43b3c4f3646c2b21ba809d402ad3d4e9 to your computer and use it in GitHub Desktop.
Declaring and using hashmaps 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
#!/usr/bin/env bash | |
declare -A profile_urls=( | |
[github]=https://github.com/froi | |
[blog]=https://froi.dev | |
[mastodon]=https://mastodon.social/@froi | |
[linked_in]=https://linkedin.com/in/froilanirizarry | |
) | |
for key in "${!profile_urls}[@]"; do | |
echo "${profile_urls[$key]}" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment