Hi I wanted to write a simple bash script to execute some google cloud commands using the google cloud shell Terminal. Doing this I got always some kind of variable error, so I wrote a simple script to understand what's going on. This is the script:
#! /bin/bash
STR1=string1
STR2=string2
echo $STR1$STR2
echo "My String1= ${STR1} My String2= ${STR2}"
My expected output which I got on my ubuntu terminal was this:
string1string2
My String1= string1 My String2= string2
However when I execute it on cloud shell it looks like this:
For some reason Cloud Shell ignores my first variable. What could be the reason?