Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cp(1)

ex(1)

more(1)

pr(1)

tail(1)

CAT(1)                               BSD                                CAT(1)



NAME
     cat - catenate and print

SYNOPSIS
     cat [ -u ] [ -n ] [ -s ] [ -v ] file ...

DESCRIPTION
     The cat command reads each file in sequence and displays it on the
     standard output.  Thus,

                    cat file

     displays the file on the standard output, and

                    cat file1 file2 >file3

     concatenates the first two files and places the result on the third.

     If no input file is specified, or if the argument - is encountered, cat
     reads from the standard input file.  Output is buffered in the block size
     recommended by stat(2), unless the standard output is a terminal, when it
     is line buffered.

OPTIONS
     -u        Make the output completely unbuffered.

     -n        Display the output lines preceded by line numbers, numbered
               sequentially from one.  You can specify -b with -n, if you want
               to omit the line numbers from blank lines.

     -s        Crush out multiple adjacent empty lines so that the output is
               displayed single-spaced.

     -v        Display non-printing characters.  Control characters appear
               like ^X for CTRL/X; the delete character (octal 0177) appears
               as ^?.  Non-ASCII characters (with the high bit set) are
               printed as M- (for meta) followed by the character of the low 7
               bits. If you specify the -e option with the -v option, display
               a dollar sign ($) character at the end of each line.  If you
               specify the -t option with the -v option, display tab
               characters as ^I.

BUGS
     Beware of cat a b >a and cat a b >b, which destroy the input files before
     reading them.

SEE ALSO
     cp(1), ex(1), more(1), pr(1), tail(1)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026