Created
April 27, 2022 08:42
-
-
Save Himura2la/bbb8382cc98ef04a3ee33aed7b6768b7 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
groupA0=( | |
"group-A0 item-0" | |
"group-A0 item-1" | |
) | |
groupB0=( | |
"group-B0 item-0" | |
"group-B0 item-1" | |
"group-B0 item-2" | |
) | |
run(){ | |
declare -a groupA=("${!1}") | |
declare -a groupB=("${!2}") | |
for itemA in "${groupA[@]}" | |
do | |
for itemB in "${groupB[@]}" | |
do | |
echo "'$itemA' - '$itemB'" | |
done | |
done | |
} | |
run groupA0[@] groupB0[@] |
Author
Himura2la
commented
Apr 27, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment