'\" t .\" Title: cowsay .\" Author: [see the "AUTHOR(S)" section] .\" Generator: Asciidoctor 2.0.23 .\" Date: 2024-11-30 .\" Manual: Cowsay Manual .\" Source: Cowsay .\" Language: English .\" .TH "COWSAY" "1" "2024-11-30" "Cowsay" "Cowsay Manual" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 .nh .ad l .de URL \fI\\$2\fP <\\$1>\\$3 .. .als MTO URL .if \n[.g] \{\ . mso www.tmac . am URL . ad l . . . am MTO . ad l . . . LINKSTYLE blue R < > .\} .SH "NAME" cowsay, cowthink \- configurable speaking/thinking cow (and a bit more) .SH "SYNOPSIS" .sp \fBcowsay\fP [\fB\-f\fP \fIcowfile\fP] [\fB\-r\fP [\fB\-C\fP] ] [\fB\-e\fP \fIeye_string\fP] [\fB\-T\fP \fItongue_string\fP] [\fB\-bdgpstwy\fP] [\fB\-n\fP] [\fB\-W\fP \fIcolumn\fP] [] .sp \fBcowsay\fP \fB\-l\fP .sp \fBcowsay\fP [\fB\-h\fP | \fB\-\-help\fP] .SH "DESCRIPTION" .sp \fIcowsay\fP generates an ASCII\-art picture of a cow saying something provided by the user. If run with no non\-option arguments, it reads from standard input, word\-wraps the given message at about 40 columns, and prints the cow saying the given message on standard output. .sp To aid in the use of arbitrary messages with arbitrary whitespace, use the \fB\-n\fP 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 \fB\-n\fP is specified, there must not be any command line arguments left after all the switches have been processed. .sp The \fB\-W\fP specifies roughly where the message should be wrapped. The default is equivalent to \fB\-W 40\fP (i.e. wrap words at or before the 40th column). .sp If any command\-line arguments are left over after all switches have been processed, they become the cow\(cqs message, instead of using standard input. Standard input is ignored in this case. .sp If the program is invoked as \fBcowthink\fP, then the cow will think its message instead of saying it. (This is indicated by a "thought bubble" appearance in the displayed cow image. Cowsay does not take a philosophical position on whether actual cognition is occurring.) .sp (The resulting picture is technically not necessarily ASCII. It may be in other encodings, and contain non\-ASCII characters, or even terminal\-control character sequences, depending on your environment and the particular cow definition files used.) .SH "OPTIONS" .sp There are several provided modes which change the appearance of the cow depending on its particular emotional/physical state. .SS "Cow modification" .sp \fB\-b\fP .RS 4 Invokes Borg mode. .RE .sp \fB\-d\fP .RS 4 Causes the cow to appear dead. .RE .sp \fB\-g\fP .RS 4 Invokes greedy mode. .RE .sp \fB\-p\fP .RS 4 Causes a state of paranoia to come over the cow. .RE .sp \fB\-s\fP .RS 4 Makes the cow appear thoroughly stoned. .RE .sp \fB\-t\fP .RS 4 Yields a tired cow. .RE .sp \fB\-w\fP .RS 4 Is somewhat the opposite of \fB\-t\fP, and initiates wired mode. .RE .sp \fB\-y\fP .RS 4 Brings on the cow\(cqs youthful appearance. .RE .sp \fB\-e\fP .RS 4 Selects the appearance of the cow\(cqs eyes, in which case the first two characters of the argument string \fIeye_string\fP will be used. The default eyes are \fBoo\fP. Any configuration done by \fB\-e\fP and \fB\-T\fP will be lost if one of the provided modes is used. .RE .sp \fB\-T\fP .RS 4 Selects the appearance of the cow\(cqs tongue. The \fItongue_string\fP argument must be two characters. By default, no tongue appears, except in the \fIdead\fP and \fIstoned\fP modes. .RE .SS "Cow selection" .sp \fB\-f\fP .RS 4 Specifies a particular cow picture file (\fIcowfile\fP) to use. If the cowfile spec resolves to an existing file, then it will be interpreted as a path to the cowfile. Otherwise, cowsay will search the COWPATH for a cowfile with that name (and a \fI.cow\fP extension). Additional cowpath entries may be specified in the \fBCOWPATH\fP environment variable. To list all cowfiles on the current \fBCOWPATH\fP, call \fBcowsay \-l\fP. .RE .sp \fB\-r\fP .RS 4 Chooses a random cow from the cows on the \fBCOWPATH\fP. .RE .sp \fB\-C\fP .RS 4 Enables true\-color (24\-bit) cows. Currently only has an effect when used in conjunction with \fB\-r\fP. If not given, then \fB\-r\fP only selects from ammong non\-true\-color cows. .RE .SS "Non\-cow operations" .sp \fB\-l\fP .RS 4 Lists the defined cows on the current \fBCOWPATH\fP. Displays it in a human\-readable pretty\-printed format when displaying to a terminal device. When sent to a non\-terminal device, outputs the list in a parsing\-friendly format with one cow name per line and no headers or blank lines. .RE .sp \fB\-h\fP .RS 4 Displays a help screen. .RE .SH "COWFILE FORMAT" .sp A cowfile is made up of a simple block of \fBperl(1)\fP code, which assigns a picture of a cow to the variable \fB$the_cow\fP. Should you wish to customize the eyes or the tongue of the cow, then the variables \fB$eyes\fP and \fB$tongue\fP may be used. The trail leading up to the cow\(cqs message balloon is composed of the character(s) in the \fB$thoughts\fP variable. Other variables should not be set. .sp Any backslashes in the cowfile text (inside string literals or heredocs) must be doubled to prevent interpretation. Also, any "@", "$", and maybe "&" characters must be escaped with backslashes, because that is what Perl expects. .sp The name of a cowfile must end with \fB.cow\fP, otherwise it is not recognized as a cowfile. .SH "ENVIRONMENT" .sp The \fBCOWPATH\fP environment variable, if present, will be used to search for cowfiles. It contains a colon\-separated list of directories, much like \fBPATH\fP or \fBMANPATH\fP. .sp The default \fBCOWPATH\fP is searched after entries in the user\-specified \fBCOWPATH\fP environment variable. To suppress this behavior (e.g. for development work), set the \fBCOWSAY_ONLY_COWPATH\fP environment variable to \fB1\fP. In this case, \fBCOWPATH\fP should contain at least a directory with a file called \fBdefault.cow\fP in it. .SH "FILES" .sp \fB%PREFIX%/share/cowsay/cows\fP holds a sample herd of cowfiles. Your \fBCOWPATH\fP automatically contains this directory, unless the \fBCOWSAY_ONLY_COWPATH\fP environment variable is set to \fB1\fP. .sp \fB%PREFIX%/share/cowsay/site\-cows\fP is provided for administrators to install custom cows. Cows in \fBshare/cowsay/site\-cows\fP take precedence over cows with the same name in \fBshare/cowsay/cows\fP. The \fBsite\-cows\fP directory will never be modified by cowsay installations, so custom cows defined there will persist across upgrades of cowsay. \fBsite\-cows\fP is also on the default \fBCOWPATH\fP. .sp \fB%PREFIX%/etc/cowsay/cowpath.d/\fP (or \fB/etc/cowsay/cowpath.d/\fP when %PREFIX% is \fB/usr\fP) is a directory that contains files which list entries to be added to the default \fBCOWPATH\fP. This mechanism allows third\-party cow collections to register themselves with cowsay in a way that does not require per\-user configuration. The path files under \fBcowpath.d\fP must have the file extension \fB.path\fP (or they will be ignored), and must contain a list of directory paths, one per line. .sp In the special case when \fBcowsay\fP is installed to the prefix \fB/usr\fP, then \fB/etc\fP instead of \fB%PREFIX%/etc\fP is used for the configuration files, including \fBcowpath.d\fP. .SH "BUGS" .sp If you find any, please report them on the cowsay GitHub page (\c .URL "https://github.com/cowsay\-org/cowsay/issues" "" ")," or notify the author at the email address below. .SH "AUTHOR" .sp Cowsay is maintained by Andrew Janke (\c .MTO "floss\(atapjanke.net" "" ")." .sp Cowsay was originally written by Tony Monroe (\c .MTO "tony\(atnog.net" "" ")," with suggestions from Shannon Appel ( .MTO "appel\(atcsua.berkeley.edu" "" ")" and contributions from Anthony Polito ( .MTO "aspolito\(atcsua.berkeley.edu" "" ")." .SH "RESOURCES" .sp GitHub: \c .URL "https://github.com/cowsay\-org/cowsay" "" "" .sp Main web site: \c .URL "http://cowsay.diamonds" "" "" .SH "SEE ALSO" .sp \fBfortune(1)\fP, \fBperl(1)\fP, \fBwall(1)\fP, \fBnwrite(1)\fP, \fBfiglet(6)\fP