stormbot/modules/bash/bash.sh

13 lines
380 B
Bash
Raw Normal View History

2016-09-24 16:19:52 -04:00
[ -f functions.sh ] && source functions.sh
set -f
2016-09-24 16:19:52 -04:00
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*}"
2020-08-10 07:36:22 -04:00
quote="$(echo "$quote" | pandoc -t plain)"
msg "$2" "$(echo "$quote" | tr -cd '[:print:]')"
set +f