Cowsay

Last updated
cowsay
Original author(s) Tony Monroe
Initial release1999
Stable release
3.8.4 [1]   OOjs UI icon edit-ltr-progressive.svg / 30 November 2024;59 days ago (30 November 2024)
Repository
Written in Perl
Operating system Cross-platform
Available in English
License Artistic License / GNU General Public License
Website http://nog.net/~tony/warez/cowsay.shtml (archived)

cowsay is a program that generates ASCII art pictures of a cow with a message. [2] 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. [3] 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. [4]

Contents

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 |                ||     ||

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-ftux  _________________________________________/ You are only young once, but you can    \\ stay immature indefinitely.             / -----------------------------------------   \    \        .--.       |o_o |       |:_/ |      //   \ \     (|     | )    /'\_   _/`\    \___)=(___/

Using the parameter -l 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 defaultdragon dragon-and-cow duck elephant elephant-in-snake eyes flaming-sheepghostbusters gnu head-in hellokitty kiss kitty koala kosh luke-koalamech-and-cow meow milk moofasa moose mutilated pony pony-smaller ren sheepskeleton snowman sodomized-sheep stegosaurus stimpy suse three-eyes turkeyturtle tux unipony unipony-smaller vader vader-koala www

Parameters

OptionPurpose
-nDisables 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.
-WSpecifies width of the speech balloon in columns, i.e. characters in a monospace font. Default value is 40.
-bBorg 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_stringManually specifies the cow′s eye-type, e.g. cowsay -e ^^ (see Eastern-style emoticon). [5]
-T tongue_stringManually specifies the cow′s tongue shape, e.g. cowsay -T \(\) for a pair of parentheses. [5]
-f cowfileSpecifies a .cow file from which to load alternative ASCII art. Accepts both absolute file-paths and those relative to the environment variable COWPATH.
-lLists the names of available cow-files in the COWPATH directory instead of displaying a quote.

Related Research Articles

<span class="mw-page-title-main">Bash (Unix shell)</span> GNU replacement for the Bourne shell

In computing, Bash is an interactive command interpreter and command programming language developed for UNIX-like operating systems. Created in 1989 by Brian Fox for the GNU Project, it is supported by the Free Software Foundation and designed as a 100% free alternative for the Bourne shell (sh) and other proprietary Unix shells.

<span class="mw-page-title-main">GNU</span> Free software collection

GNU is an extensive collection of free software, which can be used as an operating system or can be used in parts with other operating systems. The use of the completed GNU tools led to the family of operating systems popularly known as Linux. Most of GNU is licensed under the GNU Project's own General Public License (GPL).

<span class="mw-page-title-main">Linux distribution</span> Operating system based on the Linux kernel

A Linux distribution is an operating system that includes the Linux kernel for its kernel functionality. Although the name does not imply product distribution per se, a distro, if distributed on its own, is often obtained via a website intended specifically for the purpose. Distros have been designed for a wide variety of systems ranging from personal computers to servers and from embedded devices to supercomputers.

<span class="mw-page-title-main">Xfce</span> Desktop environment

Xfce or XFCE is a free and open-source desktop environment for Linux and other Unix-like operating systems.

man page Unix software documentation

A man page is a form of software documentation found on Unix and Unix-like operating systems. Topics covered include programs, system libraries, system calls, and sometimes local system details. The local host administrators can create and install manual pages associated with the specific host. A manual end user may invoke a documentation page by issuing the man command followed by the specific detail they require. These manual pages are typically requested by end users, programmers and administrators doing real time work but can also be formatted for printing.

Hack is a 1984 roguelike video game that introduced shops as gameplay elements and expanded available monsters, items, and spells. It later became the basis for NetHack.

Almquist shell is a lightweight Unix shell originally written by Kenneth Almquist in the late 1980s. Initially a clone of the System V.4 variant of the Bourne shell, it replaced the original Bourne shell in the BSD versions of Unix released in the early 1990s.

<span class="mw-page-title-main">APT (software)</span> Free software package management system

Advanced Package Tool (APT) is a free-software user interface that works with core libraries to handle the installation and removal of software on Debian and Debian-based Linux distributions. APT simplifies the process of managing software on Unix-like computer systems by automating the retrieval, configuration and installation of software packages, either from precompiled files or by compiling source code.

<span class="mw-page-title-main">GoboLinux</span> Linux distribution

GoboLinux is a Linux distribution whose most prominent feature is a reorganization of the traditional Linux file system. Rather than following the Filesystem Hierarchy Standard like most Unix-like systems, each program in a GoboLinux system has its own subdirectory tree, where all of its files may be found. Thus, a program "Foo" has all of its specific files and libraries in /Programs/Foo, under the corresponding version of this program at hand. For example, the commonly known GCC compiler suite version 8.1.0, would reside under the directory /Programs/GCC/8.1.0.

FIGlet is a computer program that generates text banners, in a variety of typefaces, composed of letters made up of conglomerations of smaller ASCII characters. The name derives from "Frank, Ian and Glenn's letters".

<span class="mw-page-title-main">Slax</span> Linux distribution

Slax is a LiveCD Linux distribution developed by Tomáš Matějíček and based on upstream customizable Linux distributions. Packages can be added by apt package manager or can be prepared as modules. The tagline for Slax refers to itself as "your pocket operating system".

The archiver, also known simply as ar, is a Unix utility that maintains groups of files as a single archive file. Today, ar is generally used only to create and update static library files that the link editor or linker uses and for generating .deb packages for the Debian family; it can be used to create archives for any purpose, but has been largely replaced by tar for purposes other than static libraries. An implementation of ar is included as one of the GNU Binutils.

fortune is a program that displays a pseudorandom message from a database of quotations. Early versions of the program appeared in Version 7 Unix in 1979. The most common version on modern systems is the BSD fortune, originally written by Ken Arnold. Distributions of fortune are usually bundled with a collection of themed files, containing sayings like those found on fortune cookies, quotations from famous people, jokes, or poetry.

test is a command-line utility found in Unix, Plan 9, and Unix-like operating systems that evaluates conditional expressions. test was turned into a shell builtin command in 1981 with UNIX System III and at the same time made available under the alternate name [.

<span class="mw-page-title-main">Linux</span> Family of Unix-like operating systems

Linux is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution (distro), which includes the kernel and supporting system software and libraries—most of which are provided by third parties—to create a complete operating system, designed as a clone of Unix and released under the copyleft GPL license.

<span class="mw-page-title-main">Tux (mascot)</span> Mascot of Linux

Tux is a penguin character and the official brand character of the Linux kernel. Originally created as an entry to a Linux logo competition, Tux is the most commonly used icon for Linux, although different Linux distributions depict Tux in various styles. The character is used in many other Linux programs and as a general symbol of Linux.

sar (Unix) Unix command to collect, report or save system activity information

System Activity Report (sar) is a Unix System V-derived system monitor command used to report on various system loads, including CPU activity, memory/paging, interrupts, device load, network and swap space utilization. Sar uses /proc filesystem for gathering information.

systemd Suite of system components for Linux

systemd is a software suite that provides an array of system components for Linux operating systems. The main aim is to unify service configuration and behavior across Linux distributions. Its primary component is a "system and service manager" — an init system used to bootstrap user space and manage user processes. It also provides replacements for various daemons and utilities, including device management, login management, network connection management, and event logging. The name systemd adheres to the Unix convention of naming daemons by appending the letter d. It also plays on the term "System D", which refers to a person's ability to adapt quickly and improvise to solve problems.

Alpine Linux is a Linux distribution designed to be small, simple, and secure. It uses musl, BusyBox, and OpenRC instead of the more commonly used glibc, GNU Core Utilities, and systemd. This makes Alpine one of few Linux distributions not to be based on the GNU Core Utilities or glibc.

<span class="mw-page-title-main">Emmabuntüs</span> Linux distribution based on Ubuntu

Emmabuntüs is a Linux distribution derived from Debian and designed to facilitate the restoration of computers donated to humanitarian organizations like the Emmaüs Communities.

References

  1. "Release 3.8.4". 30 November 2024. Retrieved 29 December 2024.
  2. Orr, Mike (June 2001). "cowsay--ASCII Art for Your Screen". Linux Gazette. Archived from the original on 2012-03-19. Retrieved 2012-04-24.
  3. Newborough, Philip (2007-10-05). "A Virtual Richard Stallman for Cowsay Hack". Archived from the original on 2011-07-25.
  4. 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. Retrieved 2022-01-31.
  5. 1 2 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.