stormbot/modules/bash/bash.sh

12 lines
370 B
Bash
Raw Normal View History

2016-09-24 16:19:52 -04:00
[ -f functions.sh ] && source functions.sh
quote="$(curl -s http://bash.org/?random)"
quote="$(echo "$quote" | grep -m 1 -A 10 '"Permanent link to this quote."')"
quote="${quote#*class=\"qt\">}"
quote="${quote//&lt;/<}"
quote="${quote//&gt;/>}"
quote="${quote%%<p class*}"
2016-09-24 16:19:52 -04:00
quote="$(echo "$quote" | html2text)"
msg "$2" "$(echo "$quote" | tr -s '[:space:]' ' ')"
2016-09-24 16:19:52 -04:00
exit 0