The terminal can get a little tiresome by the end of a full working week, so why not use cowsay to add a little fun to your stdout?
Just be sure to check its actually installed before you start calling it from your shell scripts. I found it was installed by default on Debian based distros but not on a Centos7 VM i spun up using vagrant, so you’re mileage may vary as they say.
Installation
sudo apt-get install cowsay
Basic usage
cowsay “hello”
View all the possible “cows”
ls -1 /usr/share/cowsay/cows | cut -d . -f1 | while read eachline; do cowsay -f $eachline “$eachline”; done
There’s loads of them and more to choose from online too. In the meantime, here’s a couple dragons to whet your appetite…
You can specify the cow you want, in the command with say -f dragon
If you want tux to tell you the current price of bitcoin in USD….
install pre-reqs: sudo apt-get install cowsay jq curl
curl -s 'https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=usd' | jq -r '.bitcoin.usd' | xargs -I {} cowsay -f tux "Current Bitcoin price is {} USD"
Create a zsh command alias to have tux announce the bitcoin price each time you clear the terminal.
Create the file: ~/.oh-my-zsh/custom/aliases.zsh
alias cls="clear && curl -s 'https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=usd' | jq -r '.bitcoin.usd' | xargs -I {} cowsay -f tux ""{} USD" 2>&1""
