Curl or read each line of url text file, then output each to separate files labelled as consecutive numbers- 1 2 3 etc
<p>I have a text file, which contains a list of 32 url's- i'll call it url.txt </p>

<p>I would like to curl the output of each url, and for each result/output, produce a separate file (so there would be a separate file for each url). I would like each consecutive file produced to be labelled with a number, starting from 1 up to 32. The number of url's might increase in the future so if the code could someone name each url from 1 to whatever the number of last url in the list, that would be even better. What is the simplest way of me achieving this?</p>

<p>EDIT- additional info example of urls (they are api searches):</p>

<pre><code>http://svcs.ebay.com/services/search/FindingService/v1?OPERATION-NAME=findCompletedItems&amp;SERVICE-NAME=FindingService&amp;SERVICE-VERSION=1.13.0&amp;SECURITY-APPNAME=myappname-DATA-FORMAT=XML&amp;GLOBAL-ID=EBAY-GB&amp;REST-PAYLOAD&amp;itemFilter(0).name=SoldItemsOnly&amp;itemFilter(0).value=true&amp;itemFilter(1).name=Condition&amp;itemFilter(1).value=3000&amp;itemFilter(2).name=MinPrice&amp;itemFilter(2).paramName=Currency&amp;itemFilter(2).paramValue=GBP&amp;itemFilter(2).value=55&amp;itemFilter(3).name=MaxPrice&amp;itemFilter(3).paramName=Currency&amp;itemFilter(3).paramValue=GBP&amp;itemFilter(3).value=300&amp;categoryId=11233&amp;locatedIn=European&amp;keywords=vinyl+-collection+-signed+-single+-singles&amp;paginationInput.entriesPerPage=1&amp;paginationInput.pageNumber=1

http://svcs.ebay.com/services/search/FindingService/v1?OPERATION-NAME=findCompletedItems&amp;SERVICE-NAME=FindingService&amp;SERVICE-VERSION=1.13.0&amp;SECURITY-APPNAME=myappname-DATA-FORMAT=XML&amp;GLOBAL-ID=EBAY-GB&amp;REST-PAYLOAD&amp;itemFilter(0).name=SoldItemsOnly&amp;itemFilter(0).value=true&amp;itemFilter(1).name=Condition&amp;itemFilter(1).value=3000&amp;itemFilter(2).name=MinPrice&amp;itemFilter(2).paramName=Currency&amp;itemFilter(2).paramValue=GBP&amp;itemFilter(2).value=55&amp;itemFilter(3).name=MaxPrice&amp;itemFilter(3).paramName=Currency&amp;itemFilter(3).paramValue=GBP&amp;itemFilter(3).value=300&amp;categoryId=11233&amp;locatedIn=European&amp;keywords=vinyl+-collection+-signed+-single+-singles&amp;paginationInput.entriesPerPage=1&amp;paginationInput.pageNumber=2
</code></pre>