Skip to content

Instantly share code, notes, and snippets.

@fernandovaller
Created December 18, 2021 13:46
Show Gist options
  • Save fernandovaller/971ac8f6f22048ebedf9b6bdfec3df73 to your computer and use it in GitHub Desktop.
Save fernandovaller/971ac8f6f22048ebedf9b6bdfec3df73 to your computer and use it in GitHub Desktop.
Exemplo de shell script em FOR com indice e valor
#!/bin/sh
declare -A DATA_BASES
DATA_BASES+=(
[table]="this table"
)
for TABLE in "${!DATA_BASES[@]}"; do
:
# table
echo "${TABLE}"
# this table
echo "${DATA_BASES[$TABLE]}"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment