5 ms·
for i in `seq -w 19`; do echo "http://hackermonthly.com/xmas/hackermonthly-issue0"$i".zip"; done | xargs wget
by _ques 15y ago
for i in `seq -w 19`; do
echo "http://hackermonthly.com/xmas/hackermonthly-issue0"$i".zip";
done | xargs wget
- DannyPage 15y agoThanks for this! Considering how quickly it took someone to write a script to download them all (It is "Hacker" News, after all), I don't know why they didn't just release them all in one Zip file anyway. Or maybe someone could put a torrent together, given how much they are getting hammered. (2 hours for a 15.6 MB file, yikes!)
- sublimepua 15y agoThe download links of the page seem irregular, so I was trying to make a list. It looks like he kept all issues ordered on the server under another name though, one that fits this format.
- philfreo 15y agoIn parallel: for i in `seq -w 19`; do wget "http://hackermonthly.com/xmas/hackermonthly-issue0"$i".zip" & done wait
- sublimepua 15y agothis guy's servers must be crying.
- Dobbs 15y agoseq -w 19 | xargs -I{} -P4 -n1 wget "http://hackermonthly.com/xmas/hackermonthly-issue0{}.zip http://hackermonthly.com/xmas/hackermonthly-issue0{}.zip
- anthonyb 15y agoDon't download in parallel! No wonder his servers are crawling... No good deed goes unpunished, indeed.
- davvid 15y agoLet's not forget GNU parallel, that would be naughty ;-) seq -w 19 | parallel wget http://hackermonthly.com/xmas/hackermonthly-issue0{}.zip ;-)
- jacquesm 15y agoGood deeds rarely go unpunished. Thank you Lim Cheng Soon, that was very generous of you. Merry Christmas to you too!
- bearwithclaws 15y agoHappy Christmas, Jacques!
- sciurus 15y agoThe loop can be replaced with bash's brace expansion (http://www.gnu.org/software/bash/manual/bashref.html#Brace-Expansion http://www.gnu.org/software/bash/manual/bashref.html#Brace-E...), e.g. wget http://hackermonthly.com/xmas/hackermonthly-issue0{01..19}.zip
- dorkitude 15y agoWow, never knew about that. Due to zero-padding, I found I actually needed two commands for this to work properly: http://hackermonthly.com/xmas/hackermonthly-issue00{1..9}.zip http://hackermonthly.com/xmas/hackermonthly-issue0{10..19}.zip
- ryanbraganza 15y agoTry: $ wget http://hackermonthly.com/xmas/hackermonthly-issue{001..19}.zip http://hackermonthly.com/xmas/hackermonthly-issue{001..19}.z...
- rbonvall 15y agoBash is smart: $ echo {01..20} 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 $ echo {1..20} 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
- eurleif 15y agoBash 4 is smart. Bash 3 isn't.