Below is the script that I am running
#!/bin/bash
region=('us-east-1' 'eu-central-1')
env=('prod' 'stage')
for region in "${region[@]}"
do
for env in "${env[@]}"
do
echo "$region"
echo "$env"
done
done
The output that I am getting is
us-east-1
prod
us-east-1
stage
eu-central-1
stage
eu-central-1
stage
But my expectation was to get
us-east-1
prod
us-east-1
stage
eu-central-1
prod
eu-central-1
stage
The script should run for both env conditions, but its running only once for prod and thrice for stage. Where am I going wrong here, any pointers or advice would be appreciated