Skip to content

Instantly share code, notes, and snippets.

@lartie
Created December 14, 2022 19:44
Show Gist options
  • Save lartie/e52da3ab20b57c71561e1d42d13449d6 to your computer and use it in GitHub Desktop.
Save lartie/e52da3ab20b57c71561e1d42d13449d6 to your computer and use it in GitHub Desktop.
func whoisnext() {
if ! command -v shuf &> /dev/null; then
brew install coreutils
fi
if ! command -v cowsay &> /dev/null; then
brew install cowsay
fi
if ! command -v lolcat &> /dev/null; then
brew install lolcat
fi
cow=$(cowsay -l | grep -v \/ | xargs echo -n | sed 's/ /\n/g' | shuf - | head -n 1 | tr -d '\r')
person=$(echo "$@" | sed 's/ /\n/g' | shuf - | head -n 1 | tr -d '\r')
echo "$person" | cowsay -f "$cow" | lolcat
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment