I am experiecing a quite wierd situation.
I have the following .env file:
REGION=europe-west1
MULTIREGION=EU
DATASET=desconexion_digital
BUCKETNAME=desconexion-digital-files
SENT_EMAILS_TOPIC=desconexiondigitalemailingestion
When I load the environment variables to my bash session and print BUCKETNAME variable, I get the following:
$ source .env
$ echo $BUCKETNAME
desconexion-digital-files
However, when I try to format my variable into a string, I get the following:
$ echo gs://$BUCKETNAME/templates
/templatesnexion-digital-files
The output I was expecting was gs://desconexion-digital-files/templates.
I made a comprobation to check if my syntax was correct, and I overwrote the variable the following way:
$ BUCKETNAME=desconexion-digital-files
$ echo gs://$BUCKETNAME/templates
gs://desconexion-digital-files/templates
and then I got the expected output. It seems the problem is when I load the variable from a .env file using the source command. Any idea how should I declare the variable?