Looking for some help on writing a bash script with command that call multiple variables where each variable contains list of text that needs file to run against
Here is my example.
file1.txt:
USA
EU
Asia
SouthAmerica
file2.txt:
user1
user2
user3
user4
var1=$(cat file1.txt)
var2=$(cat file2.txt)
echo $var1
USA EU Asia SouthAmerica
echo $var2
user1 user2 user3 user4
What I need is for
while read var1 var2;
do
*command* --region $var1 --profile $var2 *do something*;
done | tee -a $var2.txt
How can I get the one command to iterate through contents of var1 and var2 to produce the results I need?