Is there a way to write a for loop with a URL and change the URL each time? I want to append &skip=XX with different numbers to skip, is there a way to write it so that the variable is in the URL?
closed as unclear what you're asking by slm♦ Jul 3 '14 at 15:24
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
Yes, easily. For example:
for num in 100 200 300; do curl "http://foo.bar&skip=$num" ; done
Or, you can have the list of numbers in a file (one per line) and use a while loop:
while read num; do curl "http://foo.bar&skip=$num" ; done < nums.txt
Or even generate them using
seq 100 100 300 | while read num; do curl "http://foo.bar&skip=$num" ; done