Downloading multiple files with curl with different proxies I'm trying to download multiple urls from different domains using different proxies.

It should do all these in one row of code, running curl just once:

do shell script "curl --proxy 1.2.3.4:800 http://domain1.com/somefile.txt"
do shell script "curl --proxy 2.3.4.5:80 http://www.domain2.com/otherfile.png"
do shell script "curl --proxy 3.4.5.6:8080 http://domain3.com/file.jpg"
...


This fails:

do shell script "curl --proxy 1.2.3.4:800 2.3.4.5:80 3.4.5.6:8080 http://domain1.com/somefile.txt http://www.domain2.com/otherfile.png http://domain3.com/file.jpg"




Taking the code from an answer below I tried to run

set url_list to "1.2.3.4:800 http://domain1.com/somefile.txt
2.3.4.5:80 http://www.domain2.com/otherfile.png
3.4.5.6:8080 http://domain3.com/file.jpg"

do shell script "xargs curl --proxy &lt; " &amp; url_list


but this fails as well.
When you have a long URL or multiples, use xargs instead:

do shell script "xargs curl --proxy &lt; url-list.txt"


url-list.txt

1.2.3.4:800 http://domain1.com/somefile.txt
2.3.4.5:80 http://www.domain2.com/otherfile.png
3.4.5.6:8080 http://domain3.com/file.jpg