#!/usr/bin/env bash
sum() {
declare -i acc
for i; do acc+=i; done
echo $acc
}
curl -s 'http://www.xkcdb.com/?random1' |
hxnormalize -i 0 -l 99999999999 -x | hxselect -cs '
\n%
\n' 'span.quote' |
html2text -b 0 | hxunent | sed '$d; s/ *$//' | sed '$d'
exit $(sum ${PIPESTATUS[*]})