1 | $ 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 |
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\’ \’ \’` )
count=${#array}
random=$((RANDOM%count))fortune |cowsay -f ${array[$random]%%.cow}
Related articles by Zemanta
- Big Ben\’s statement…fortune cookie version (pittsburgh.metblogs.com)
- Get the most favourite commands from commandlinefu (amit-agarwal.co.in)
- Some questions and their answers… (teabreak.pk)
- fortune cookie wisdom (bipolarsoupkitchen-stephany.blogspot.com)