Hi all.
I was looking around the web for a method to download all the xkcd webcomic strips at once. xkcd is available under Creative Commons, so there's no legality issue, I just can't seem to figure it out. I've found what apparently is a script on DZone - link - but I have no idea how to run it. I saved it as a plain text file in TextEdit, then changed the extension to .sh and tried to get it to execute in Terminal, but no joy. Terminal states: "Cannot execute binary file".
The code provided in the link is this:
(With the sequence number updated in line with the current strip number)
If anyone could help me out, that would be great.
I was looking around the web for a method to download all the xkcd webcomic strips at once. xkcd is available under Creative Commons, so there's no legality issue, I just can't seem to figure it out. I've found what apparently is a script on DZone - link - but I have no idea how to run it. I saved it as a plain text file in TextEdit, then changed the extension to .sh and tried to get it to execute in Terminal, but no joy. Terminal states: "Cannot execute binary file".
The code provided in the link is this:
Code:
#!/bin/bash
for i in `seq 1 449`
do
wget http://xkcd.com/$i/
wget `grep http://imgs.xkcd.com/comics/ index.html | head -1 | cut -d\" -f2`
rm index.html
done
(With the sequence number updated in line with the current strip number)
If anyone could help me out, that would be great.