Cookie Jar

Programming is a lot about reading. You get to read documentation, tutorials, books and of course code. Since I started programming I've been eager to read and my bookshelf has now dozen of geeky books (programming books tends to be quite large).

While crawling in the documentation and books I found gems that I kept preciously in a dusty .quote file in my home folder (I guess everyone has that kind of file). When I find a good quote, I put it there.

Recently, I started to read The Art of Unix Programming which contains a lot of awesome quotes. I had to share the love, so I converted my quote compilation into a fortune(1) file available here.

Setup

For Ubuntu / Debian you'll need to install the fortune-mod package.

In order to be usable by the fortune(1) utility, you need to produce an index file. This can be done with the strfile(1) tool. In this example, my fortune file is ~/.local/share/games/fortune/kaworu.

% strfile ~/.local/share/games/fortune/kaworu
"/home/alex/.local/share/games/fortune/kaworu.dat" created
There were 18 strings
Longest string: 815 bytes
Shortest string: 86 bytes
Now to display a quote:
% fortune ~/.local/share/games/fortune
Nothing travels faster than the speed of light with the possible exception of
bad news, which obeys its own special laws.
                -- The Hitchhiker's Guide to the Galaxy

Feel free to comment with your favourite quote(s), and enjoy :)