Fortune Cookie

October 18th, 2006 aizatto Posted in cowsay, fortune, Misc | Hits: 22994 | 4 Comments »

I can’t believe this hasn’t been covered yet! So I thought I’ll cover it at least.

Today, I’m feeling in a good mood. Don’t know what, perhaps its the fortune’s I have been getting. Sadly though these fortunes aren’t magical and it wasn’t destiny that I was to get this fortune. Or maybe it was, who knows if rand() is rigged sometimes just to favor you?

So if your feeling in the mood for a fortune cookie, fire up your terminal and start typing!

fortune

Hopully that was able to cheer you up..No?
Well lets see what kind of fortunes are installed on my machine

fortune -f

Which gives me:

52.24% fortunes
31.76% literature
16.00% riddles

So on my Ubuntu Dapper Drake machine, I did a apt-cache search fortunes (on my and behold! More fortunes! Ranging from mario, to offensive, to different languages. So I decided to install some of them for fun.

To run a specific fortune just enter:

fortune FORTUNENAME

Now to wrap it up! This requires cowsay to be installed.

cowsay `fortune`

And tada, we get our fortune wrapped in beautiful ascii art.

 _________________________________________
/ Live in a world of your own, but always \
\ welcome visitors.                       /
 -----------------------------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

Similarly you can change what type of image is displayed.
So if I run:

cowsay -f tux `fortune`

 _______________________________________
/ You have an ability to sense and know \
\ higher truth.                         /
 ---------------------------------------
   \
    \
        .--.
       |o_o |
       |:_/ |
      //   \ \
     (|     | )
    /'\_   _/`\
    \___)=(___/

Ain't he cute? If you want you can make your own asii art actually!

For a list of what cowsay's you have run:

cowsay -l

So I hope you enjoy your fotune today.

If you have the disclaimer package installed for fortune, for fun add to your .bashrc

fortune disclaimer


and now you'll get disclaimers everytime you start your Terminal!

4 Responses to “Fortune Cookie”

  1. Haha great, me actually

    apt-get install fortunes

    and get a long list. I like

    fortune acsii-art

    And

    cowsay -l

    list all the cow files you have installed.
    I like this

    cowsay -f ghostbusters "Okay LBE, hooooooooooo"
  2. Excellent Indepth Review Of Linux Shell Commands…

    I subscribed to the RSS feed of this blog, he is very good, and has been putting about three examples a week up. Take a look! Linux by Examples Linux by Examples We……

  3. Thanks for the fortune-help!

  4. y did u publish this site it doesn’t even make any sense!!!!
    wow this site is really borring theres no point to it.
    AND ITS STUPID!!!! :( blah :(

Leave a Reply