Skip to content

Instantly share code, notes, and snippets.



Created Oct 10, 2016
What would you like to do?
cd ~/Downloads/auto/
echo "============================" >> log.txt
echo "[$(date)] script launched" >> log.txt
echo "[$(date)] renewing dllist.txt" >> log.txt
rm dllist.txt
wget --user=folani --password=passwordesh
echo "[$(date)] creating active.txt" >> log.txt
comm dllist.txt done.txt -23 --nocheck-order > active.txt
while [ -s active.txt ]
echo "[$(date)] starting download" >> log.txt
head -n 1 active.txt >> log.txt
head -n 1 active.txt | sed -e's/%\([0-9A-F][0-9A-F]\)/\\\\\x\1/g' | xargs echo -e | xargs -I {} wget -c "{}"
echo "[$(date)] finished" >> log.txt
head -n 1 active.txt >> done.txt
tail -n +2 active.txt > tmp.txt
mv tmp.txt active.txt
echo "[$(date)] script finished." >> log.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment