Skip to content

Instantly share code, notes, and snippets.

@kghost
Created September 19, 2012 09:01
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kghost/3748568 to your computer and use it in GitHub Desktop.
Save kghost/3748568 to your computer and use it in GitHub Desktop.
#! /bin/bash
for i in {1..20}
do
for j in {1..20}
do
echo $((i+j)) $i $j
done
done | sort -n | while read sum i j
do
for lat in {n,s}
do
for lng in {w,e}
do
wget -c "http://imgs.xkcd.com/clickdrag/${i}${lat}${j}${lng}.png"
done
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment