Annotation of 43BSDReno/bin/cat/cat.1, revision 1.1.1.1

1.1       root        1: .\" Copyright (c) 1989, 1990 The Regents of the University of California.
                      2: .\" All rights reserved.
                      3: .\"
                      4: .\" Redistribution and use in source and binary forms are permitted provided
                      5: .\" that: (1) source distributions retain this entire copyright notice and
                      6: .\" comment, and (2) distributions including binaries display the following
                      7: .\" acknowledgement:  ``This product includes software developed by the
                      8: .\" University of California, Berkeley and its contributors'' in the
                      9: .\" documentation or other materials provided with the distribution and in
                     10: .\" all advertising materials mentioning features or use of this software.
                     11: .\" Neither the name of the University nor the names of its contributors may
                     12: .\" be used to endorse or promote products derived from this software without
                     13: .\" specific prior written permission.
                     14: .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
                     15: .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
                     16: .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
                     17: .\"
                     18: .\"     @(#)cat.1      6.12 (Berkeley) 7/24/90
                     19: .\"
                     20: .Dd July 24, 1990
                     21: .Dt CAT 1
                     22: .Os BSD 3
                     23: .Sh NAME
                     24: .Nm cat
                     25: .Nd concatenate and print files
                     26: .Sh SYNOPSIS
                     27: .Nm cat
                     28: .Op Fl benstuv
                     29: .Op Fl
                     30: .Ar
                     31: .Sh DESCRIPTION
                     32: The
                     33: .Nm cat
                     34: utility reads files sequentially, writing them to the standard output.
                     35: The
                     36: .Ar file
                     37: operands are processed in command line order.
                     38: A single dash represents standard input.
                     39: .Pp
                     40: The options are as follows:
                     41: .Tw Ds
                     42: .Tp Fl b
                     43: Implies the
                     44: .Fl n
                     45: option but doesn't number blank lines.
                     46: .Tp Fl e
                     47: Implies the
                     48: .Fl v
                     49: option, and displays a dollar sign (``$'') at the end of each line
                     50: as well.
                     51: .Tp Fl n
                     52: Number the
                     53: .Ar output
                     54: lines, starting at 1.
                     55: .Tp Fl s
                     56: Squeeze multiple adjacent empty lines, causing the output to be
                     57: single spaced.
                     58: .Tp Fl t
                     59: Implies the
                     60: .Fl v
                     61: option, and displays tab characters as ``^I'' as well.
                     62: .Tp Fl u
                     63: The
                     64: .Fl u
                     65: option guarantees that the output is unbuffered.
                     66: .Tp Fl v
                     67: Displays non-printing characters so they are visible.
                     68: Control characters print line ``^X'' for control-X; the delete
                     69: character (octal 0177) prints as ``^?''.
                     70: Non-ascii characters (with the high bit set) are printed as
                     71: `.`M-'' (for meta) followed by the character for the low 7 bits.
                     72: .Tp
                     73: .Pp
                     74: .Nm Cat
                     75: is useful for getting files into a pipe, for instance, to sort
                     76: two files together,
                     77: the command
                     78: .Pp
                     79: .Dl cat file1 file2 | sort > sfile
                     80: .Pp
                     81: reads the contents of
                     82: file1 and file2 sequentially, pipes it all to sort and places the
                     83: newly sorted data in file3.
                     84: .Pp
                     85: Because of the shell language mechanism used to perform output
                     86: redirection, the command ``cat file1 file 2 > file1'' will cause
                     87: .P original data in file1 to be destroyed!
                     88: .Pp
                     89: .Nm Cat
                     90: The cat utility exits 0 on success, and >0 if an error
                     91: occurs.
                     92: .Sh SEE ALSO
                     93: .Xr head 1 ,
                     94: .Xr more 1 ,
                     95: .Xr pr 1 ,
                     96: .Xr tail 1
                     97: .Pp
                     98: Rob Pike,
                     99: .Em UNIX Style, or cat -v Considered Harmful
                    100: USENIX Summer Conference Proceedings, 1983.
                    101: .Sh HISTORY
                    102: The
                    103: .Nm
                    104: command appeared in Version 7 AT&T UNIX.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.