I\'ve been trying to create a simple script that will take a list of queries from a .txt file, append the main url variable, then scrape the content and output it to a text file
Use more quotes !
Try this instead :
url="example.com/?q=" for i in $(cat query.txt); do content="$(curl -s "$url/$i")" echo "$content" >> output.txt done