Fun with Cowsay

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""
Did you like this?
Tip cyberfella with Cryptocurrency

Donate Bitcoin to cyberfella

Scan to Donate Bitcoin to cyberfella
Scan the QR code or copy the address below into your wallet to send some bitcoin:

Donate Bitcoin Cash to cyberfella

Scan to Donate Bitcoin Cash to cyberfella
Scan the QR code or copy the address below into your wallet to send bitcoin:

Donate Ethereum to cyberfella

Scan to Donate Ethereum to cyberfella
Scan the QR code or copy the address below into your wallet to send some Ether:

Donate Litecoin to cyberfella

Scan to Donate Litecoin to cyberfella
Scan the QR code or copy the address below into your wallet to send some Litecoin:

Donate Monero to cyberfella

Scan to Donate Monero to cyberfella
Scan the QR code or copy the address below into your wallet to send some Monero:

Donate ZCash to cyberfella

Scan to Donate ZCash to cyberfella
Scan the QR code or copy the address below into your wallet to send some ZCash:

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.