Cowsay

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

Template:Short description Template:Lowercase Script error: No such module "Infobox".Template:Template other Script error: No such module "Check for unknown parameters".Script error: No such module "Check for conflicting parameters". Script error: No such module "Portal". cowsay is a program that generates ASCII art pictures of a cow with a message.[1] It can also generate pictures using pre-made images of other animals, such as Tux the Penguin, the Linux mascot. It is written in Perl. There is also a related program called Template:Mono, with cows with thought bubbles rather than speech bubbles. .cow files for cowsay exist which are able to produce different variants of cows, with different kinds of eyes, and so forth.[2] It is sometimes used on IRC, desktop screenshots, and in software documentation. It is more or less a joke within hacker culture, but has been around long enough that its use is rather widespread. In 2007, it was highlighted as a Debian package of the day.[3]

Example

The Unix command Template:Mono can also be piped into the Template:Mono command:

[user@hostname ~]$ fortune | cowsay
 ________________________________________
/ You have Egyptian flu: you're going to \
\ be a mummy.                            /
 ----------------------------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

Using the parameter Template:Mono followed by Template:Mono, one can replace the cow with other beings, such as Tux, the Linux mascot:

[user@hostname ~]$ fortune | cowsay -f tux
 _________________________________________
/ You are only young once, but you can    \
\ stay immature indefinitely.             /
 -----------------------------------------
   \
    \
        .--.
       |o_o |
       |:_/ |
      //   \ \
     (|     | )
    /'\_   _/`\
    \___)=(___/

Using the parameter Template:Mono shows all available cow files:

[user@hostname ~]$ cowsay -l
Cow files in /usr/share/cowsay/cows:
apt beavis.zen bong bud-frogs bunny calvin cheese cock cower daemon default
dragon dragon-and-cow duck elephant elephant-in-snake eyes flaming-sheep
ghostbusters gnu head-in hellokitty kiss kitty koala kosh luke-koala
mech-and-cow meow milk moofasa moose mutilated pony pony-smaller ren sheep
skeleton snowman sodomized-sheep stegosaurus stimpy suse three-eyes turkey
turtle tux unipony unipony-smaller vader vader-koala www

Parameters

Option Purpose
-n Disables word wrap, allowing the cow to speak FIGlet or to display other embedded ASCII art. Width in columns becomes that of the longest line, ignoring any value of Template:Mono.
-W Specifies width of the speech balloon in columns, i.e. characters in a monospace font. Default value is 40.
-b Borg mode”, uses Template:Mono in place of Template:Mono for the cow′s eyes.
-d “Dead”, uses Template:Mono, plus a descending Template:Mono to represent an extruded tongue, also used on Linux kernel oops.
-g “Greedy”, uses Template:Mono.
-p “Paranoid”, uses Template:Mono.
-s “Stoned”, uses Template:Mono to represent bloodshot eyes, plus a descending Template:Mono to represent an extruded tongue.
-t “Tired”, uses Template:Mono.
-w “Wired”, uses Template:Mono.
-y “Youthful”, uses Template:Mono to represent smaller eyes.
-e eye_string Manually specifies the cow′s eye-type, e.g. Template:Kbd (see Eastern-style emoticon).[4]
-T tongue_string Manually specifies the cow′s tongue shape, e.g. Template:Kbd for a pair of parentheses.[4]
-f cowfile Specifies a .cow file from which to load alternative ASCII art. Accepts both absolute file-paths and those relative to the environment variable Template:Mono.
-l Lists the names of available cow-files in the Template:Mono directory instead of displaying a quote.

References

<templatestyles src="Reflist/styles.css" />

  1. Script error: No such module "citation/CS1".
  2. Script error: No such module "citation/CS1".
  3. Script error: No such module "citation/CS1".
  4. a b Characters other than printable in C0 controls and basic Latin (U+0021–U+007E) will not display properly as these parameters accept only the first two bytes of input value. Using a pre-defined cow-face will over-ride any value of Template:Mono and Template:Mono.

Script error: No such module "Check for unknown parameters".

External links