cowsay

Original author(s)| Tony Monroe
Written in| Perl
Operating system| Cross-platform
Available in| English
License| Artistic License / GNU General Public License
Website| nog.net:80/~tony/warez/cowsay.shtml (archived)

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 cowthink, 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]

## Contents

* 1 Example
* 2 Parameters
* 3 References
* 4 External links

## Example

The Unix command fortune can also be piped into the cowsay command:

[user@hostname ~]$ fortune | cowsay
________________________________________
/ You have Egyptian flu: you're going to \
\ be a mummy.                            /

-
\   ^__^
\  (oo)\_______
(__)\       )\/\
||
-w |
||     ||

And using the parameter -f followed by tux, 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 -l shows all available cowfiles:

[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

If a user wants to show examples of all the different cowfiles they can run this command:

[user@hostname ~]$ for i in $(cowsay -l); do cowsay -f $i "$i"; done

Once the user has this output they can either pipe:

[user@hostname ~]$ ls | cowsay -f tux
________________________________________
/ ChangeLog cows cowsay cowsay.1 INSTALL \
| install.pl install.sh LICENSE MANIFEST |
\ pgp_public_key.txt README Wrap.pm.diff /

-

.--.
|o_o |
|:_/ |
//   \ \
(|     | )
/'\_   _/`\
\___)=(___/

Or just "cowsay" your text for this command:

[username@hostname ~]$ cowsay -f tux "Huh... Must be that I am Tux..."

_____________________
/ Huh... Must be that \
\ I am Tux...         /

.--.
|o_o |
|:_/ |
//   \ \
(|     | )
/'\_   _/`\
\___)=(___/

## 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 -W.
-W  | Specifies width of the speech balloon in columns, i.e. characters in a monospace font. Default value is 40.
-b  | “Borg mode”, uses == in place of oo for the cow′s eyes.
-d  | “Dead”, uses XX, plus a descending U to represent an extruded tongue, also used on Linux kernel oops.
-g  | “Greedy”, uses $$.
-p  | “Paranoid”, uses @@.
-s  | “Stoned”, uses ** to represent bloodshot eyes, plus a descending U to represent an extruded tongue.
-t  | “Tired”, uses \--.
-w  | “Wired”, uses OO.
-y  | “Youthful”, uses .. to represent smaller eyes.
-e eye_string  | Manually specifies the cow′s eye-type, e.g. `cowsay -e ^^` (see Eastern-style emoticon).[4]
-T tongue_string  | Manually specifies the cow′s tongue shape, e.g. `cowsay -T \(\)` 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 COWPATH.
-l  | Lists the names of available cow-files in the COWPATH directory instead of displaying a quote.

## References

1. ↑ Orr, Mike (June 2001). "cowsay--ASCII Art for Your Screen". Linux Gazette. http://linuxgazette.net/issue67/orr.html.
2. ↑ Newborough, Philip (2007-10-05). "A Virtual Richard Stallman for Cowsay Hack". http://crunchbang.org/archives/2007/10/05/a-virtual-richard-stallman-for-cowsay-hack/.
3. ↑ Beshenov, Alexey (2007-10-28). "cowsay: a configurable talking and thinking cow". Debian Package of the Day. http://debaday.debian.net/2007/10/28/cowsay-a-configurable-talking-and-thinking-cow/.
4. ↑ 4.0 4.1 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 -e and -T.

## External links

* "Official website". http://www.nog.net/~tony/warez/cowsay.shtml.
* Cowsay in the Linux Kernel
* CGI frontend to Cowsay
* Graphical cowsay for X Window system
* Cowsay for Android
* Cowsay Online
* Cowsay Online Editor
* Cowsay Android package at the F-Droid repository

* Neo cowsay
* Pony wrapper for cowsay
* cowsay in Java
* cowsay in R
* pysay: cowsay in Python
* cowsay in Go
* cowsay in Rust
* cowsay in Scheme
* cowsay for SailfishOS
* Collection of additional cow files
* Rosetta Cow: cowsay in different programming languages

|

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/Cowsay. Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Software:Cowsay&oldid=2130483"