The cat utility reads files sequentially, writing them to the standard output. The file operands are processed in command line order. A single dash represents the standard input.
The options are as follows:
Rob Pike, "UNIX Style, or cat -v Considered Harmful", USENIX Summer Conference Proceedings, 1983.
3rd Berkeley Distribution May 2, 1995
Abbreviation, stock ticker, domain name, and popular nickname for Caterpillar, Inc. Also, shorthand for any of the numerous construction machines they manufacture (See "Tremors").
cat [from `catenate' via Unix cat(1)] vt.
1. [techspeak] To spew an entire file to the screen or some other output sink without pause (syn. blast). 2. By extension, to dump large amounts of data at an unprepared target or with no intention of browsing it carefully. Usage: considered silly. Rare outside Unix sites. See also dd, BLT.
Among Unix fans, cat(1) is considered an excellent example of user-interface design, because it delivers the file contents without such verbosity as spacing or headers between the files, and because it does not require the files to consist of lines of text, but works with any sort of data.
Among Unix haters, cat(1) is considered the canonical example of bad user-interface design, because of its woefully unobvious name. It is far more often used to blast a file to standard output than to concatenate two files. The name cat for the former operation is just as unintuitive as, say, LISP's cdr.
Of such oppositions are holy wars made.... See also UUOC.
--The Jargon File version 4.3.1, ed. ESR, autonoded by rescdsk.
One Hell of a nice animal, frequently mistaken for a meatloaf.
Cat is a collection of cartoons by B. Kliban. It is his first book, and the work for which he will be remembered best. Sublimely silly, Kliban's cartoons range from the side-splittingly funny and sharply perceptive to the utterly mystifying.
It's gonna be a great year, mother. Look at the whiskers on those cats.
Published in 1975 largely thanks to the enthusiasm of the cartoon editor of Playboy (the first magazine to use his cartoons), Cat made B. Kliban an overnight sensation. In the years that followed he published seven best-selling books of virtually cat-free cartoons, but it was his cats which really caught the public imagination; before long there were Cat calendars, Cat towels, Cat T-shirts, Cat pillowcases. The Kliban cats became iconic; even if you have never heard the name, you will have seen the cats about the place - rounded, round-eyed, stripey, sometimes wearing sneakers. Some people feel that if it hadn't been for Kliban's cat cartoons there would have been no Garfield, no Heathcliff, no Fat Freddy's Cat; there is no doubting his profound influence on the generation of cartoonists who followed him.
My cat is fat So now I'll dine And eat all up This cat of mine.
Although B. Kliban himself died in 1990 and his cats have fallen from ubiquity, the Kliban Cat industry is still thriving. The official Kliban Cat shop site at www.kliban.com sells a huge range of merchandising, including three kinds of calendar for 2002, four different mouse pads, eighteen different fridge magnets and an assortment of golf balls; a quick Google search turns up several more, less-official-looking sites which seem to carry their own range of Kliban Cat merchandising. Since Kliban's death his wife, Judith Kamann Kliban, has continued to work with the B. Kliban®Cats company on the creation of 'new Kliban concepts,' and on the continuing recycling of old ones into new products. www.eatmousies.com is another official Kliban site with galleries, biographies, Flash animations and a recording of the eating mousies song to download.
trout trout
Cat Words Now? Wow Prowl Wackawacka* Crown? Pert Prang Marie? * Not widely used.
* Not widely used.
See also: http://www.imaginethis.net/imaginethis/imaginehome/kliban.htm
The name of the cat in Breakfast at Tiffany's. He hangs around the main character Holly Golightly throughout the movie. She refuses to give "cat" a name because she says he doesn't belong to anyone.
A little excerpt from the script, right after the cat screeches
Paul AKA Fred: Is he alright? Holly: Sure. Sure, He's O.K. aren't you, cat? Poor old cat. Poor slob. Poor slob without a name. I don't have the right to give him one. We don't belong to each other. We just took up one day. I don't want to own anything.
So she just calls him "cat" throughout the movie.
Source: www.script-o-rama.com
CAT Chat -- Domestic cat whose edible meat has a flavor halfway between that of rabbit and that of hare. Cat's meat has often been eaten in periods of famine or siege. Legend has it that in the cook-shops the cat is often used in the making of rabbit fricassées. Examination of the bones would easily enable one, in case of doubt, to distinguish between the one animal and the other.
Not from Larousse Gastronomique :
Adding one half teaspoon of curry powder to your cat's food every day for the two weeks prior to preparation adds a subtle yet wonderful flavor to the resulting dish.
cat is one of the simplest UNIX commands that often makes people go 'why?' until they come upon some deeper enlightenment about the underlying nature of UNIX.
At its very basic cat is short for 'concatenate'. When run cat takes the files on the command line and prints them back to standard output in order. If only one file is given as arguments it only prints that one file.
Common to all versions of cat are a few options: benstuv. Some versions (most notably those of GNU and FSF distributions) have some others. For the examples - the following file will be used:
% cat file This is a file It has several lines. And some special characters. This line has 3 spaces after the. The line above has one space. %
The -b option is one of two options for numbering lines - in different ways. If both are specified as options, this one is used. This option numbers lines that have any content in them (including white space and non-printable characters). Lines that don't are left blank and skipped in counting.
% cat -b file 1 This is a file 2 It has several lines. 3 And some special characters. 4 This line has 3 spaces after the. 5 6 The line above has one space. %
This option has two functions:
% cat -e file This is a file$ $ $ It has several lines.$ And some ^G special characters.$ This line has 3 spaces after the. $ $ The line above has one space.$ %
Similar to the -b option above, the -n option numbers the output lines. However, in this case, all lines are numbered - including those that are blank.
% cat -n file 1 This is a file 2 3 4 It has several lines. 5 And some special characters. 6 This line has 3 spaces after the. 7 8 The line above has one space. %
The -s option is short for 'squeeze'. This option will change multiple instances of a blank line to a single blank line. However the number of times this is blank is lost (if you want to maintain this information, consider the uniq program).
% cat -s file This is a file It has several lines. And some special characters. This line has 3 spaces after the. The line above has one space. %
Similar to the -e option above the -t option prints out control characters with the ^ notation. The -t option doesn't put the '$' at the end of the line and furthermore renders tabs as '^I' while -e (and -v) will print out a tab as a tab rather than its control character equivalent.
% cat -t file This is a file It has several lines. And some ^G special characters. This line has 3 spaces after the. The line above has one space. %
The -u is mostly something left over from days of old though still does have occasional use. This option causes the output to be unbuffered. In many cases data being sent is sent in chunks from a buffer rather than as it is generated. This is often better to the network where each chunk of data (big or small) has the same overhead - and one big chunk is preferable to lots of small chunks of data. The output is only noticeable (and maybe not even then) if this was running across a network (rather than local system and one was snooping the traffic.
'-v' is the option that is at the core of '-e' and '-t' above. Without any fuss - the '-v' option prints out the file with control characters with the ^ notation. Not mention above (though still part of it), high ASCII characters are printed out as 'M-#' where '#' is the character for the lower 7 bits (the 'M' stands for 'meta' which is the key used to get these chracters on most UNIX systems).
% cat -v file This is a file It has several lines. And some ^G special characters. This line has 3 spaces after the. The line above has one space. %
A special 'file' that may be used my many programs is that of '-'. Specifying '-' as a file instructs the program to read from standard input rather than a named file on the disk. As each line is entered, cat does as it is supposed to. If no files are specified, then standard input is read.
% cat -n - file abc 1 abc def 2 def ghi 3 ghi ^D 4 This is a file 5 6 7 It has several lines. 8 And some special characters. 9 This line has 3 spaces after the. 10 11 The line above has one space. %
On the flip side of the use of cat is what is known as 'cat abuse' in the UNIX world. Many of the regulars of comp.lang.perl often pointed out instances of when cat is used when it doesn't need to be.
An example of this can be seen:
From: Tom Christiansen <tchrist@mox.perl.com> Subject: Re: Calculating word frequencies within files? Date: 1997/01/18 Message-ID: <5br1i3$q5l$1@csnews.cs.colorado.edu> references: <32DAFC78.347B@ecst.csuchico.edu> <5bgtqe$aj42@quest.lmtas.lmco.com> <5bopbi$jo@engnews1.Eng.Sun.COM> content-type: text/plain; charset=ISO-8859-1 organization: Perl Consulting and Training reply-to: tchrist@mox.perl.com (Tom Christiansen) newsgroups: comp.lang.perl.misc originator: tchrist@mox.perl.com [courtesy cc of this posting sent to cited author via email] In comp.lang.perl.misc, falk@peregrine.eng.sun.com (Ed Falk) writes: : cat file | cat abuse. : sed -e '/\./d' | # remove troff directives : fmt -1 | # one word per line : sort | # group words together : uniq -c | # produce counts : sort -rn # sort by decreasing frequency. --tom -- Tom Christiansen Perl Consultant, Gamer, Hiker tchrist@mox.perl.com /* This is the one truly awful dwimmer necessary to conflate C and sed. */ --Larry Wall, from toke.c in the v5.0 perl distribution
cat file | sed -e '/\./d' | ...
sed -e '/\./d' file | ...
The kin of cat are head, tail, and more - though countless other programs exist to print files to the standard out (if one is a real glutton for punishment, dd is recommended). In the DOS world, this program is similar to the program type.
"Cat" is also a verb that has nothing to do with boats (see Mr. Webster's entry for the nautical version).
Cat (?), n. [AS. cat; akin to D. & Dan. kat, Sw. kett, Icel. kottr, G. katze, kater, Ir. Cat, W. cath, Armor. kaz, LL. catus, Bisc. catua, NGr , , Russ. & Pol. cot, Turk. kedi, Ar. qitt; of unknown origin. CF. Ketten.]
1. Zool.
An animal of various species of the genera Felis and Lynx. The domestic cat is Felis domestica. The European wild cat (Felis catus) is much larger than the domestic cat. In the United States the name wild cat is commonly applied to the bay lynx (Lynx rufus) See Wild cat, and Tiger cat.
⇒ The domestic cat includes many varieties named from their place of origin or from some peculiarity; as, the Angora cat; the Maltese cat; the Manx cat.
The word cat is also used to designate other animals, from some fancied resemblance; as, civet cat, fisher cat, catbird, catfish shark, sea cat.
2. Naut. (a)
A strong vessel with a narrow stern, projecting quarters, and deep waist. It is employed in the coal and timber trade.
A strong tackle used to draw an anchor up to the cathead of a ship.
Totten.
3.
A double tripod (for holding a plate, etc.), having six feet, of which three rest on the ground, in whatever position in is placed.
4.
An old game; (a) The game of tipcat and the implement with which it is played. See Tipcat. (c) A game of ball, called, according to the number of batters, one old cat, two old cat, etc.
5.
A cat o' nine tails. See below.
Angora cat, blind cat, See under Angora, Blind. -- Black cat the fisher. See under Black. -- Cat and dog, like a cat and dog; quarrelsome; inharmonius. "I am sure we have lived a cat and dog life of it." Coleridge. -- Cat block Naut., a heavy iron-strapped block with a large hook, part of the tackle used in drawing an anchor up to the cathead. -- Cat hook Naut., a strong hook attached to a cat block. -- Cat nap, a very short sleep. [Colloq.] -- Cat o' nine tails, an instrument of punishment consisting of nine pieces of knotted line or cord fastened to a handle; -- formerly used to flog offenders on the bare back. -- Cat's cradle, game played, esp. by children, with a string looped on the fingers so, as to resemble small cradle. The string is transferred from the fingers of one to those of another, at each transfer with a change of form. See Cratch, Cratch cradle. -- To let the cat out of the bag, to tell a secret, carelessly or willfully. [Colloq.] -- Bush cat, the serval. See Serval.
© Webster 1913.
Cat (?), v. t. [imp. & p. p. catted; p. pr. & vb. n. Catting.] Naut.
To bring to the cathead; as, to cat an anchor. See Anchor.
printable version chaos
Everything2 Help