http://nullnyan.i2p/b/42431
:$ ]] \ || { echo "Usage: $0 http://thread_url" ; exit 1 ; } mkdir -p $thread /.cache cd $thread if [[ -f .cache/0.json ]] \ && echo -n "Found cached thread, checking image links health..." \ && [[ " $( curl -s -o/dev/null --dump-header - --head " $proto $( jq -r '[.posts[].attachments[].images.thumb_100px.url][0]' \ .cache/0.json ) " ) " = ~ ^HTTP/ [ 0 -9. ] + \ 200 ]] then echo "good." lastpost = " $( jq -r '.posts[-1].id|tonumber' .cache/*.json ([ -1 ] ) )" echo -n "Fetching thread...