let a cow tell you your fortune
let a cow tell you your fortune
<td>
<div class="text codecolorer">
$ fortune | <a class="zem_slink freebase/en/cowsay" title="Cowsay" rel="homepage" href="http://www.nog.net/%7Etony/warez/cowsay.shtml">cowsay</a> -f tux
</div>
</td>
</tr>
</table>
Let Tux bring the fortune cookie
by David Winterbottom (codeinthehole.com)
#!/bin/bash –
#===============================================================================# FILE: fortune_cowsay.sh
# USAGE: ./fortune_cowsay.sh
# DESCRIPTION: Cowsay with random cow file.. 🙂
# OPTIONS: —
# REQUIREMENTS: —
# BUGS: —
# NOTES: —
# AUTHOR: (),
# COMPANY:
# VERSION: 1.0
# CREATED: 06/01/2010 03:25:59 PM IST
# REVISION: —
#===============================================================================array=( `ls -1 /usr/share/cowsay/ |tr ’\n’ ’ ’` )
random=$((RANDOM%count))
count=${#array}fortune |cowsay -f ${array[$random]%%.cow}<h6 class="zemanta-related-title">Related articles by Zemanta <ul class="zemanta-article-ul"> <li class="zemanta-article-ul-li"><a href="http://pittsburgh.metblogs.com/2010/04/26/big-bens-statement-fortune-cookie-version/">Big Ben’s statement…fortune cookie version (pittsburgh.metblogs.com) <li class="zemanta-article-ul-li"><a href="http://blog.amit-agarwal.co.in/2010/05/12/get-the-most-favourite-commands-from-commandlinefu/">Get the most favourite commands from commandlinefu (amit-agarwal.co.in) <li class="zemanta-article-ul-li"><a href="http://teabreak.pk/some-questions-and-their-answers-178/35194/">Some questions and their answers… (teabreak.pk) <li class="zemanta-article-ul-li"><a href="http://bipolarsoupkitchen-stephany.blogspot.com/2010/05/fortune-cookie-wisdom.html">fortune cookie wisdom (bipolarsoupkitchen-stephany.blogspot.com) <div class="zemanta-pixie"><a class="zemanta-pixie-a" title="Reblog this post [with Zemanta]" href="http://reblog.zemanta.com/zemified/af1138ca-bee5-428a-8b0c-0263e1a4b095/"><img class="zemanta-pixie-img" src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/reblog_b94.png" alt="Reblog this post [with Zemanta]" /><span class="zem-script more-related more-info pretty-attribution paragraph-reblog">
Related Articles:
- 2010/05/27 Checking the links to your site (from affiliates) using cron and bash script.
- 2010/05/10 coproc help - a new feature in bash
- 2010/05/27 vim - get mappings from the help tex files available with the scripts.
- 2010/05/17 Script to download all the related videos from youtube with youtube-dl
- 2010/04/11 bash script to change vim colorscheme based on the available themes

Authored By Amit Agarwal
Amit Agarwal, Linux and Photography are my hobbies.Creative Commons Attribution 4.0 International License.
1
|