let a cow tell you your fortune

Here\’s something that I saw on commandlinefu yesterday. That sent me thinking about some command to have the cow file picked randomly 🙂 So, here\’s the original command from the commandlinefu:
let a cow tell you your fortune
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

\"commandlinefu.com\"

by David Winterbottom (codeinthehole.com)

\"\"

Now, for some fun

#!/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}

\"Reblog

Google staff dropping Windows for Macs, Linux PCs

For those who keep saying this is not the year of linux and probably it will never be 🙂
Google staff dropping Windows for Macs, Linux PCs
Google is abandoning the use of Windows by its staff as it\’s too much of a security threat, multiple staffers said Monday night. Recent concerns about Chinese hacks have the search firm requiring either a Mac or Linux for all new recruits to provide better security. Those who want Windows now often require explicit approval from executives and may not have any choice on desktops where it\’s only an option for notebooks.
\"Reblog