I have a script like below, and I'd like for the script to loop through variables and create a file for each variable. I have researched and can't find a way to do it. Might be that my googling is subpar.
API="link to API"
#city
newyork="latitude-longitude"
boston="latitude-longitude"
miami="latitude-longitude
curl -s "$API$city" > $city.txt
I have tried putting the variables in a different file and then making a loop for each line, but then the script of course included the name of the variable. Unsure of how to attack this issue without using an array.