Skip to content

Instantly share code, notes, and snippets.

@toctan
Last active December 17, 2015 11:39
Show Gist options
  • Save toctan/5604384 to your computer and use it in GitHub Desktop.
Save toctan/5604384 to your computer and use it in GitHub Desktop.
Download 3 videos concurrently using youtube-dl.
#!/bin/bash
i=0
while read LINE
do
(youtube-dl $LINE -o "%(title)s.%(ext)s") &
let i++
if (( $i % 3 == 0 )); then
wait # Limit to 3 concurrent subshells
fi
done < $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment