Created
December 14, 2017 21:24
-
-
Save mshirdel/70cc29cd2c6ced65ea3b89916a034a0e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
aria2c -j1 -i list -c --save-session output.log | |
has_error=`wc -l < output.log` | |
while [ $has_error -gt 0 ] | |
do | |
echo "still has $has_error errors, rerun aria2 to download ..." | |
aria2c -j1 -i list -c --save-session output.log | |
has_error=`wc -l < output.log` | |
sleep 10 | |
done | |
### PS: one line solution, just loop 1000 times | |
### seq 1000 | parallel -j1 aria2c -i list.txt -c |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment