index RSS main


First, a word from our sponsors (i.e. google adsense):

The Devil's Fortunes

Tired of BSD fortunes of, er, varying quality, I grabbed myself a textfile version of Bierce's The Devil's Dictionary, and devised a simple recipe:

	· take one text file of Ambrose Bierce's "The Devil's Dicionary" 
	    e.g.  wget http://www.gutenberg.org/ebooks/972.txt.utf-8 
	· snip a bit of extraneous text from top and tail 
	    seriously?
	· sed (yes that's a verb fuck you) said file:

	    sed '/^[A-Z][A-Z]/{
		i\
		%
	    }'

	    (yes, Virginia, you'll be using a temp file)
	· compile the strfile utility
            hey! "this is unix, and there is a minimum height required to ride"
	    (hint: fortune(6))
	·  $ strfile 972.txt.utf-8  (or whatever)
	·  $ cd /usr/share/games/fortune && rm *  (probably as root; because you
	    know you've always wanted to do that.)
	·  $ mv $HOME/972.txt.utf-8 ./fortune 
	·  $ mv $HOME/972.txt.utf-8.dat ./fortune.dat 

Eh voilà:


    $ fortune
    OCCASIONAL, adj.  Afflicting us with greater or less frequency.  That,
    however, is not the sense in which the word is used in the phrase
    "occasional verses," which are verses written for an "occasion," such
    as an anniversary, a celebration or other event.  True, they afflict
    us a little worse than other sorts of verse, but their name has no
    reference to irregular recurrence.

    $

Bon appetit!

Paul Dunne, Sun Sep 25 10:07:44 CEST 2016


created with stb

Viewable with any browser

pay no attention to the 1x1 gif behind the curtain!