Hey, I had the same problem but following Sergeant_Salz's advice, adding a \ to the end of the first line fixed it for me.
curl 'http://api.wolframalpha.com/v2/query?input=googlevideo.com&appid=$APPID$&format=plaintext&podstate=WebSiteStatisticsPod:InternetData__Subdomains&podstate=WebSiteStatisticsPod:InternetData__Subdomains_More' \
Not sure how to test if the script worked however.