Hacker News new | ask | show | jobs
by icebraining 3953 days ago
You could also use a for loop. But as others pointed out, that doesn't allow you to add items to the queue after it has started.
2 comments

It does if you use a fifo instead of a text file. This is the difference between basic Unix literacy and actual Unix proficiency. I'm not being insulting; very few people take the time to learn the tools Unix provides. And naturally, a developer is going to be more interested in writing tools than most.
I don't think you can use a fifo with xargs, though it'd definitively work with a loop. Even with text files, using tail -f.

    tail -n+0 -f list.txt | xargs -n 1 -P 20 wget