tails of fortune 1 (aka tof1)

Avoid the Gates of Hell. Use Linux.
– unknown source


When your write scripts, debug code or deloy software there comes a point of boredomeness beyond fun. This is the time to install fortune and get a smile in the detection time of a keystroke.

And if you want your bash scripts to output something nice after it finished work, just put this on the line after your Shebang.

#!/bin/env bash
trap $(hash fortune && echo fortune) SIGINT SIGTERM EXIT

And if you like if colorfull and crazy.

#!/bin/env bash
function fun {
    hash fortune && hash cowsay && hash toilet && clear && fortune | cowsay -f apt | toilet --gay -f term    
}
trap fun SIGINT SIGTERM EXIT

Be sure to install fortune, cowsay and toilet.

Leave a Reply