Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,9 @@
a_index=(one two three) # create an array with a few elements
a_index+=(four five) # append some elements
a_index[9]=ten # add a specific index
for elem in "${a_index[@]}"; do # interate over the elements
echo "$elem"
done
for idx in "${!a_index[@]}"; do # interate over the array indices
printf "%d\t%s\n" $idx "${a_index[idx]}"
done

View file

@ -0,0 +1,9 @@
declare -A a_assoc=([one]=1 [two]=2 [three]=3) # create an array with a few elements
a_assoc+=([four]=4 [five]=5) # add some elements
a_assoc[ten]=10
for value in "${a_assoc[@]}"; do # interate over the values
echo "$value"
done
for key in "${!a_assoc[@]}"; do # interate over the array indices
printf "%s\t%s\n" "$key" "${a_assoc[$key]}"
done

View file

@ -0,0 +1 @@
declare -A

View file

@ -0,0 +1 @@
typeset -A