Commit | Line | Data |
---|---|---|
e8cca28c KM |
1 | .\" Copyright (c) 1980 Regents of the University of California. |
2 | .\" All rights reserved. The Berkeley software License Agreement | |
3 | .\" specifies the terms and conditions for redistribution. | |
4 | .\" | |
5f02176b | 5 | .\" @(#)cat.1 6.1 (Berkeley) %G% |
e8cca28c | 6 | .\" |
5f02176b | 7 | .TH CAT 1 "" |
e8cca28c KM |
8 | .UC 4 |
9 | .SH NAME | |
10 | cat \- catenate and print | |
11 | .SH SYNOPSIS | |
12 | .B cat | |
13 | [ | |
14 | .B \-u | |
15 | ] [ | |
16 | .B \-n | |
17 | ] [ | |
18 | .B \-s | |
19 | ] [ | |
20 | .B \-v | |
21 | ] | |
22 | file ... | |
23 | .br | |
24 | .SH DESCRIPTION | |
25 | .I Cat | |
26 | reads each | |
27 | .I file | |
334f3902 | 28 | in sequence and displays it on the standard output. Thus |
e8cca28c KM |
29 | .PP |
30 | .ti+15n | |
31 | cat file | |
32 | .PP | |
334f3902 | 33 | displays the file on the standard output, and |
e8cca28c KM |
34 | .PP |
35 | .ti+15n | |
36 | cat file1 file2 >file3 | |
37 | .PP | |
38 | concatenates the first two files and places the result on the third. | |
39 | .PP | |
334f3902 | 40 | If no input file is given, or if the argument `\-' is encountered, |
e8cca28c | 41 | .I cat |
334f3902 | 42 | reads from the standard input file. |
e8cca28c | 43 | Output is buffered in 1024-byte blocks unless the standard |
334f3902 | 44 | output is a terminal, in which case it is line buffered. The |
e8cca28c | 45 | .B \-u |
334f3902 | 46 | option makes the output completely unbuffered. |
e8cca28c | 47 | .PP |
334f3902 | 48 | The |
e8cca28c | 49 | .B \-n |
334f3902 KM |
50 | option displays the output lines preceded by lines numbers, numbered |
51 | sequentially from 1. Specifying the | |
e8cca28c | 52 | .B \-b |
334f3902 | 53 | option with the |
e8cca28c | 54 | .B \-n |
334f3902 | 55 | option omits the line numbers from blank lines. |
e8cca28c | 56 | .PP |
334f3902 | 57 | The |
e8cca28c | 58 | .B \-s |
334f3902 KM |
59 | option crushes out multiple adjacent empty lines so that the |
60 | output is displayed single spaced. | |
e8cca28c | 61 | .PP |
334f3902 | 62 | The |
e8cca28c | 63 | .B \-v |
334f3902 | 64 | option displays non-printing characters so that they are visible. |
e8cca28c KM |
65 | Control characters print like ^X for control-x; the delete character |
66 | (octal 0177) prints as ^?. | |
67 | Non-ascii characters (with the high bit set) are printed as M- | |
334f3902 | 68 | (for meta) followed by the character of the low 7 bits. A |
e8cca28c | 69 | .B \-e |
334f3902 | 70 | option may be given with the |
e8cca28c | 71 | .B \-v |
334f3902 KM |
72 | option, which displays a `$' character at the end of each line. |
73 | Specifying the | |
e8cca28c | 74 | .B \-t |
334f3902 | 75 | option with the |
e8cca28c | 76 | .B \-v |
334f3902 | 77 | option displays tab characters as ^I. |
e8cca28c KM |
78 | .PP |
79 | .SH "SEE ALSO" | |
80 | cp(1), ex(1), more(1), pr(1), tail(1) | |
81 | .SH BUGS | |
82 | Beware of `cat a b >a' and `cat a b >b', which destroy | |
83 | the input files before reading them. |