sudo apt-get install fortune-mod cowsay
sudo apt-get install fortune
Now we have the database installed in our system. have a try by typing the following:
Now let us borrow a cool script from the Mint people.
open gedit (or any editor of your choice ) and type the following script in it and save it in /usr/bin/ by the name fortune.
#!/bin/bashRANGE=4number=$RANDOMlet “number %= $RANGE”case $number in0)cow=”small”;;1)cow=”tux”;;2)cow=”koala”;;3)cow=”moose”;;esacRANGE=2number=$RANDOMlet “number %= $RANGE”case $number in0)command=”/usr/games/cowsay”;;1)command=”/usr/games/cowthink”;;esac/usr/games/fortune | $command -f $cow
Now change the mode of this file to executable by typing the following in the terminal
sudo chmod +x /usr/bin/fortune
finally type the following in the terminal
sudo echo “/usr/bin/fortune” >> ~/.bashrc
Done !!! Now you will get a cool Fortune-Cookie , each time when you open the terminal…
Enjoy !! and Happy Hacking !!