table of contents
COWSAY(1) | Cowsay Manual | COWSAY(1) |
NAME¶
cowsay, cowthink - configurable speaking/thinking cow (and a bit more)
SYNOPSIS¶
cowsay [-e eye_string] [-f cowfile | -r [-C] ] [-h] [-l] [-n] [-T tongue_string] [-W column] [-bdgpstwy] [<message>]
DESCRIPTION¶
Cowsay generates an ASCII picture of a cow saying something provided by the user. If run with no arguments, it accepts standard input, word-wraps the message given at about 40 columns, and prints the cow saying the given message on standard output.
To aid in the use of arbitrary messages with arbitrary whitespace, use the -n option. If it is specified, the given message will not be word-wrapped. This is possibly useful if you want to make the cow think or speak in figlet(6). If -n is specified, there must not be any command line arguments left after all the switches have been processed.
The -W specifies roughly where the message should be wrapped. The default is equivalent to -W 40 (i.e. wrap words at or before the 40th column).
If any command-line arguments are left over after all switches have been processed, they become the cow’s message. The program will not accept standard input for a message in this case.
If the program is invoked as cowthink then the cow will think its message instead of saying it.
OPTIONS¶
There are several provided modes which change the appearance of the cow depending on its particular emotional/physical state.
-b
-d
-g
-p
-s
-t
-w
-y
-e
-f
-r
-C
-l
-h
COWFILE FORMAT¶
A cowfile is made up of a simple block of perl(1) code, which assigns a picture of a cow to the variable $the_cow. Should you wish to customize the eyes or the tongue of the cow, then the variables $eyes and $tongue may be used. The trail leading up to the cow’s message balloon is composed of the character(s) in the $thoughts variable. Any backslashes must be reduplicated to prevent interpretation. Also, at-signs ("@") must be backslashed because that is what Perl 5 expects. The name of a cowfile must end with .cow, otherwise it is not recognized as a cowfile.
ENVIRONMENT¶
The COWPATH environment variable, if present, will be used to search for cowfiles. It contains a colon-separated list of directories, much like PATH or MANPATH.
The default COWPATH is searched after entries in the user-specified COWPATH environment variable. To suppress this behavior (e.g. for development work), set the COWSAY_ONLY_COWPATH environment variable to 1. In this case, COWPATH should contain at least a directory with a file called default.cow in it.
FILES¶
%PREFIX%/share/cowsay/cows holds a sample set of cowfiles. Your COWPATH automatically contains this directory, unless COWSAY_ONLY_COWPATH is set to 1.
%PREFIX%/share/cowsay/site-cows is provided for administrators to install custom cows. Cows in share/cowsay/site-cows take precedence over cows with the same name in share/cowsay/cows. The site-cows directory will never be modified by cowsay installations, so custom cows defined there will persist across upgrades of cowsay. site-cows is also on the default COWPATH.
%PREFIX%/etc/cowsay/cowpath.d/ (or /etc/cowsay/cowpath.d/ when %PREFIX% is /usr) is a directory that contains files which list entries to be added to the default COWPATH. This mechanism allows third-party cow collections to register themselves with cowsay in a way that does not require per-user configuration.
BUGS¶
If there are any, please report them on the cowsay GitHub page (https://github.com/cowsay-org/cowsay/issues) or notify the author at the address below.
AUTHOR¶
Cowsay is maintained by Andrew Janke (floss@apjanke.net).
Cowsay was originally written by Tony Monroe (tony@nog.net), with suggestions from Shannon Appel (appel@csua.berkeley.edu) and contributions from Anthony Polito (aspolito@csua.berkeley.edu).
RESOURCES¶
GitHub: https://github.com/cowsay-org/cowsay
Main web site: http://cowsay.diamonds
SEE ALSO¶
05/28/2020 | Cowsay 3.7.0 |