|
The cat command is a standard Unix program used to concatenate and display files. The name is from catenate, a synonym of concatenate.
SpecificationThe Single Unix Specification specifies the behavior that each of the files given in sequence as arguments will write their contents to the standard output in the same sequence, and mandates one option, -u, where each byte is printed as it is read. If the filename is specified as -, then cat will read from standard input at that point in the sequence. If no files are specified, cat will read from standard input. ExtensionsBoth the BSD versions of cat (as per the OpenBSD manpage) and the GNU coreutils version of cat specify the following options:
Unix cultureJargon File definitionThe Jargon File version 4.4.7 lists this as the definition of cat:
Useless use of catUUOC (from comp.unix.shell on Usenet) stands for "Useless Use of cat". As received wisdom on comp.unix.shell observes, "The purpose of cat is to concatenate (or 'catenate') files. If it's only one file, concatenating it with nothing at all is a waste of time, and costs you a process." Nevertheless one sees people doing cat file | some_command and its args ... instead of the equivalent and cheaper <file some_command and its args ... or (equivalently and more classically) some_command and its args ... <file Since 1995, occasional awards for UUOC have been given out, usually by Perl luminary Randal L. Schwartz. There is a web page devoted to this and other similar awards. In British hackerdom the activity of fixing instances of UUOC is sometimes called demoggification. zcatzcat is a UNIX program similar to cat, that decompresses individual files and concentrates them to standard output. Traditionally zcat operated on files compressed by compress but today it is usually able to operate on gzip or even bzip2 archives. On such systems, it's equivalent to gunzip -c.[1] See also
External links
Manual pages
Other
|
||||||||||||||||||||||||||||||||||||||||||||||
This article is from Wikipedia. All text is available under the terms of the GNU Free Documentation License.
Mercedes Car
This site monitored by SitePinger.net