I already know that you can get some nice quotes/jokes using the fortune program.
But I've found in this urwird script a new source of fun that I'd like to have when I open a new terminal.
This time the jokes come from http://www.icndb.com.
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
You can use the icndb RESTful API: http://www.icndb.com/api/.
sudo apt-get install cowsay recode jshon
Then just add the following lines to your
if [ "$PS1" ]; then wget "http://api.icndb.com/jokes/random" -qO- | jshon -e value -e joke -u | recode html | cowsay -f tux fi
Note: checking if
$PS1 is set ensures that the jokes won't be displayed on non-interactive sessions.
Now when I open a
gnome-terminal I get: