I want to write a bash script that should download data from an aspx server. I'm not sure, but I think it is an ASPX server. How can I change the variables in this string? Which is the right way to work with this string in a bash script?
#!/bin/bash
SYMBOL="EURUSD"
YEAR="2017"
WEEK="1"
TYPE="2"
BROKERID="9"
STARDATE="20100301"
ENDDATE="20171231"
wget -c \
--no-clobber \
--html-extension \
'http://livetickdata.com/GetData.aspx?type=2&brokerid=9&symbol=EURUSD&startdate=20100301&enddate=20171231&pack=1&key=$' -O $SYMBOL-$YEAR-$WEEK.csv.gz
This doesn't work:
'http://livetickdata.com/GetData.aspx?type=$TYPE&brokerid=$BROKERID&symbol=$SYMBOL&startdate=$STARTDATE&enddate=$ENDDATE&pack=1&key=$' -O $SYMBOL-$YEAR-$WEEK.csv.gz