Parallel curl with file input and output filename on Linux shell

by Luis Gómez Guzmán   Last Updated November 14, 2017 19:01 PM

I usually download files on parallel with curl and urls in a file like this:

cat links.txt | parallel --will-cite curl --connect-timeout 5 --max-time 10 --retry-max-time 40 --retry 5 --retry-delay 0 -s -f -O -C -

Where links.txt has one url per line.

Now I need to assign a custom filename to each file and I can't figure out how to add this second input to curl trough parallel. Among other things, I tried to add - o filename to each line to links.txt but it didn't work.


Related Questions

How can I emulate LPT1?

Updated May 29, 2016 08:00 AM