ponysay/extras/lightweight-ponies/lightweight-ponies

9 lines
213 B
Bash

#!/bin/sh
dir="/usr/share/ponysay/ttyponies"
if [ -n "${DISPLAY}" ]; then
dir="/usr/share/ponysay/ponies"
fi
find "${dir}" | grep '\.pony$' | shuf | head -n 1 | xargs cat | sed -e ':a;N;$!ba;s:\$[^$]*\$::g'