|Original author(s)||Tony Monroe|
|Stable release||3.03 / May 28, 1999|
|License||Artistic License / GNU General Public License|
cowsay is a program which generates ASCII pictures of a cow with a message. It can also generate pictures using pre-made images of other animals, such as Tux the Penguin, the Linux mascot. Since it is written in Perl, it is adaptable to other systems such as Microsoft Windows. 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. 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.
Cowsay and Cowthink are written in the Perl programming language, and as such is easily adaptable to system tasks in Unix, such as telling users their home directories are full, they have new mail, etc. Additionally, it is quite adaptable to the Common Gateway Interface.
$ 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 Tux, the Linux mascot:
$ fortune | cowsay -f tux _________________________________________ / You are only young once, but you can \ \ stay immature indefinitely. / ----------------------------------------- \ \ .--. |o_o | |:_/ | // \ \ (| | ) /'\_ _/`\ \___)=(___/
|-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.|
|-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).|
|-T tongue_string||Manually specifies the cow′s tongue shape, e.g. cowsay -T \(\) for a pair of parentheses.|
|-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.|
- Monroe, Tony. "cowsay source code, CHANGELOG". Retrieved 2012-04-24.
- Orr, Mike (2001-06). "cowsay--ASCII Art for Your Screen". Linux Gazette. Retrieved 2012-04-24.
- Newborough, Philip (2007-10-05). "A Virtual Richard Stallman for Cowsay Hack". Archived from the original on 2011-07-25.
- Beshenov, Alexey (2007-10-28). "cowsay: a configurable talking and thinking cow". Debian Package of the Day. Archived from the original on 2007-10-30.
- Schroder, Carla (2008-06-30). "Tip of the Trade: Linux Easter Egg Fun". ServerWatch.com. Retrieved 2012-04-24.[not in citation given]
- 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.