I have 3 variables I'm trying to insert into an echo command that contains the string, as well.
Here is what I have:
1= "test1"
2= "test2"
3= "test3"
FileName= "WEATHERMAP"_"$1"_"STATE"_"$2"_"CITY"_"$3"
echo $FileName
I want it to echo WEATHERMAP_test1_STATE_test2_CITY_test3
Instead I get WEATHERMAP__STATE__CITY_
I know this has something to do with the underscore, unfortunately, I need the underscore.
The only examples I have seen are putting two variables together, or it started with a variable followed by a string.
FileName="WEATHERMAP_${1}_STATE_${2}_CITY_${3}"a="test"