Bash execution

In the deployment process I am calling this bash file:

export URL_BACKEND=$(./teresa app info corpcom-api-queue-producer-back | grep -o '[0-9a-z.-]*.elb.amazonaws.com')
./teresa app env-set URL_BACKEND=http://$URL_BACKEND --app $TERESA_APP --no-input

export URL_PRICES=$(./teresa app info corpcom-api-prices-back | grep -o '[0-9a-z.-]*.elb.amazonaws.com')
./teresa app env-set URL_PRICES=http://$URL_PRICES --app $TERESA_APP --no-input

The first paragraph command is executed with success but not the seconds, it returns and error for the teresa binary as if the URL_PRICES variable is not set.

I am confused about how the bash commands are executed on CircleCI.

If I remove the command in the second paragraph, everything works.

I also have changed the orders of the commands to guarantee that I have no errors in the second paragraph commands.

Another test I did was to run only those two export commands but it also errors.

It looks to me like each command is executed in a separated process.