• Select as
  • Restrict to
  • Complex restrict to

  • About DebianTimes
  • Contact: debian-publicity

  • cowsay: a configurable talking and thinking cow
    on 28.10.2007, 05:00
    in packages-news

    cowsay: a configurable talking and thinking cow

    published on Sun Oct 28 05:00:15 2007 in packages-news

    Article submitted by Alexey Beshenov. We are running out of articles! Please help DPOTD and submit good articles about software you like!

    Cowsay is a useless but very fun text filter written in Perl. If you send some text into cowsay, you get an ASCII cow saying your text. For example, cowsay Hello, World! prints

     _______________
    < Hello, World! >
     ---------------
            \   ^__^
             \  (oo)\_______
                (__)\       )\/\
                    ||----w |
                    ||     ||

    To get a thinking cow, run cowthink:

    $ cowthink Hello, World!
     _______________
    ( Hello, World! )
     ---------------
            o   ^__^
             o  (oo)\_______
                (__)\       )\/\
                    ||----w |
                    ||     ||

    Program word-wraps long messages unless the -n switch is used. The -W specifies where the message should be wrapped (default is wrapping at or before the 40th column). Everything left over after command-line switches is treated as the cow’s message. Another way is to send text to cowsay’s standard input. Pipe boring or annoying things to speaking / thinking cow and have fun:

    $ uptime | cowthink -d
     _____________________________________
    (  19:16:39 up 4 days, 22:50, 1 user, )
    ( load average: 2.21, 1.74, 1.42      )
     -------------------------------------
            o   ^__^
             o  (xx)\_______
                (__)\       )\/\
                 U  ||----w |
                    ||     ||

    -d is a switch for a dead cow. Other fun switches for cow are

    • -b Borg mode
    • -g greedy mode
    • -p paranoia mode
    • -s stoned mode
    • -t tired mode
    • -w wired mode
    • -y youthful mode

    The -e selects the appearance of the cow’s eyes (default is -e oo). The tongue is configurable through -T (default is no tongue).

    You can also use other ASCII characters. Cowsay comes with a large set of “cowfiles” (actually, a pieces of Perl code) in /usr/share/cowsay/cows. Invoke cowsay with the -l switch to list them:

    apt, beavis.zen, bong, bud-frogs, bunny, cheese, cower, daemon, default, dragon, dragon-and-cow, elephant, elephant-in-snake, eyes, flaming-sheep, ghostbusters, head-in, hellokitty, kiss, kitty, koala, kosh, luke-koala, mech-and-cow, meow, milk, moofasa, moose, mutilated, ren, satanic, sheep, skeleton, small, sodomized, sodomized-sheep, stegosaurus, stimpy, supermilker, surgery, telebears, three-eyes, turkey, turtle, tux, udder, vader, vader-koala, www.

    The -f option specifies a particular cowfile (note that -bdgpstwy modes may not work with some characters as well as -T and -e switches):

    $ cowsay -f moose Hi!
     _____
    < Hi! >
     -----
      \
       \   \_\_    _/_/
        \      \__/
               (oo)\_______
               (__)\       )\/\
                   ||----w |
                   ||     ||

    Cowsay is written by Tony Monroe. The current stable branch is 3.xx, but Cowsay 4 is also available for testing from the official webpage. Cowsay packages can be found in Debian from Oldstable to Unstable and Experimental, and in Ubuntu Dapper, Edgy, Feisty, Gutsy. Of course, the program depends on Perl.