Monday, June 14, 2010

Cowsay Fortune $bash prompt

If you want a a cow telling your fortune in your bash prompt
sudo apt-get install cowsay fortune

sudo gedit .bashrc

ADD this line:
##COWSAY FORTUNE
COWDIR=/usr/share/cowsay/cows/; COWNUM=$(($RANDOM%$(ls $COWDIR | wc -l))); COWFILE=$(ls $COWDIR | sed -n ''$COWNUM'p'); fortune | cowsay -f $COWFILE

save & refresh your bash prompt by typing $bash

THANKS: Tyler Mulligan

No comments:

Post a Comment