ALINK="#FF0000">
LINUX GAZETTE
[ Prev ][ Table of Contents ][ Front Page ][ Talkback ][ FAQ ][ Next ]

"Linux Gazette...making Linux just a little more fun!"


cowsay--ASCII Art for Your Screen

By Mike Orr


cowsay is a configurable talking cow, written in Perl. It draws an ASCII cow with a speech balloon (or a think balloon) saying whatever pithy comment you give it on the command line. The program requires Perl 5.005_03 or newer. Debian Weekly News calls cowsay "an absolutely vital program for turning text into happy ASCII cows". So there you go; you need it.

According to the manpage, there are several command-line options to change the apparance of the cow:

-b
Borg
-d
dead
-g
greedy
-p
paranoid
-s
stoned
-t
tired
-w
wired (opposite of tired)
-y
youthful
You can also pass in characters for the eyes and tongue, use any of 47 supplied cowfiles (not all of which are cows), or create your own cowfile. A cowfile is a Perl script ending in .cow. The script contains a variable $the_cow containing a picture of the cow. Remember to backslash your "@"'s!

For those who can't wait to see the cows, here are some screenshots:

Script started on Fri May 25 11:56:46 2001
$ cowsay "Hello, bovine world! "
 _______________________ 
< Hello, bovine world!  >
 ----------------------- 
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

$ cowsay -b "Hello, bovine world! "
 _______________________ 
< Hello, bovine world!  >
 ----------------------- 
        \   ^__^
         \  (==)\_______
            (__)\       )\/\
                ||----w |
                ||     ||
$ M="Hello, bovine world\!"
$ cowsay -d $M
 ______________________ 
< Hello, bovine world! >
 ---------------------- 
        \   ^__^
         \  (xx)\_______
            (__)\       )\/\
             U  ||----w |
                ||     ||
$ cowsay -p $M
 ______________________ 
< Hello, bovine world! >
 ---------------------- 
        \   ^__^
         \  (@@)\_______
            (__)\       )\/\
                ||----w |
                ||     ||
$ cowsay -s $M
 ______________________ 
< Hello, bovine world! >
 ---------------------- 
        \   ^__^
         \  (**)\_______
            (__)\       )\/\
             U  ||----w |
                ||     ||
$ cowsay -y $M
 ______________________ 
< Hello, bovine world! >
 ---------------------- 
        \   ^__^
         \  (..)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

$ cowsay -f tux $M
 _______________________
< Hello, bovine world!  >
 -----------------------
   \
    \
        .--.
       |o_o |
       |:_/ |
      //   \ \
     (|     | )
    /'\_   _/`\
    \___)=(___/
                                                                                
$ cowsay -f dragon $M
 _______________________
< Hello, bovine world!  >
 -----------------------
      \                    / \  //\
       \    |\___/|      /   \//  \\
            /0  0  \__  /    //  | \ \
           /     /  \/_/    //   |  \  \
           @_^_@'/   \/_   //    |   \   \
           //_^_/     \/_ //     |    \    \
        ( //) |        \///      |     \     \
      ( / /) _|_ /   )  //       |      \     _\
    ( // /) '/,_ _ _/  ( ; -.    |    _ _\.-~        .-~~~^-.
  (( / / )) ,-{        _      `-.|.-~-.           .~         `.
 (( // / ))  '/\      /                 ~-. _ .-~      .-~^-.  \
 (( /// ))      `.   {            }                   /      \  \
  (( / ))     .----~-.\        \-'                 .~         \  `. \^-.
             ///.----..>        \             _ -~             `.  ^-`  ^-_
               ///-._ _ _ _ _ _ _}^ - - - - ~                     ~-- ,.-~
                                                                  /.-~          

$
Script done on Fri May 25 11:59:03 2001

I like that dragon, BTW.

Find cowsay at http://www.nog.net/~tony/warez/cowsay.shtml or in the unstable branch of your nearest Debian mirror, in section "games". (PS. The author's site has a link to the Cows with Guns site, which has a shadow image of, er, two cows with guns saying, "Four legs good. Two legs bad," from Orwell's Animal Farm. I wonder if Eric Raymond would approve? :)

Mike Orr

Mike ("Iron") is the Editor of Linux Gazette. You can read what he has to say in the Back Page column in this issue. He has been a Linux enthusiast since 1991 and a Debian user since 1995. He is SSC's web technical coordinator, which means he gets to write a lot of Python scripts. Non-computer interests include Ska/Oi! music and the international language Esperanto. The nickname Iron was given to him in college--short for Iron Orr, hahaha.


Copyright © 2001, Mike Orr.
Copying license http://www.linuxgazette.net/copying.html
Published in Issue 67 of Linux Gazette, June 2001

[ Prev ][ Table of Contents ][ Front Page ][ Talkback ][ FAQ ][ Next ]