Having fun in the shell with cowsay and fortune


Last weekend while I was waiting for several ansible playbooks to apply I thought it would be fun to play around with cowsay and fortune. If you aren’t familiar with these tools cowsay gives you an ASCII cow which says whatever is passed to it as an argument. Here is a example:

$ fortune | cowsay

 ________________________________
< Tomorrow, you can be anywhere. >
 --------------------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

To have a cowtastic time each time I open a shell I added the following to my bashrc:

# Have some fun
if [ -x /bin/cowsay ] && [ -x /bin/fortune ] || [ -x /usr/games/cowsay ] && [ /usr/games/fortune ]; then
fortune | cowsay
fi

I guess the old saying is right. All work and no play makes an admin mooooooooo. :)

This article was posted by Matty on 2017-01-25 09:27:00 -0400 -0400