11 lines
292 B
Bash
Executable file
11 lines
292 B
Bash
Executable file
#!/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 '<br>\n%<br>\n' 'span.quote' |
|
|
html2text -b 0 | hxunent | sed '$d; s/ *$//' | sed '$d'
|
|
exit $(sum ${PIPESTATUS[*]})
|