1.\" Copyright (c) 1989, 1990 The Regents of the University of California. 2.\" All rights reserved. 3.\" 4.\" %sccs.include.redist.man% 5.\" 6.\" @(#)cat.1 6.15 (Berkeley) 06/17/91 7.\" 8.Dd 9.Dt CAT 1 10.Os BSD 3 11.Sh NAME 12.Nm cat 13.Nd concatenate and print files 14.Sh SYNOPSIS 15.Nm cat 16.Op Fl benstuv 17.Op Fl 18.Op Ar 19.Sh DESCRIPTION 20The 21.Nm cat 22utility reads files sequentially, writing them to the standard output. 23The 24.Ar file 25operands are processed in command line order. 26A single dash represents standard input. 27.Pp 28The options are as follows: 29.Bl -tag -width Ds 30.It Fl b 31Implies the 32.Fl n 33option but doesn't number blank lines. 34.It Fl e 35Implies the 36.Fl v 37option, and displays a dollar sign 38.Pq Ql \&$ 39at the end of each line 40as well. 41.It Fl n 42Number the 43.Ar output 44lines, starting at 1. 45.It Fl s 46Squeeze multiple adjacent empty lines, causing the output to be 47single spaced. 48.It Fl t 49Implies the 50.Fl v 51option, and displays tab characters as 52.Pq Ql ^I 53as well. 54.It Fl u 55The 56.Fl u 57option guarantees that the output is unbuffered. 58.It Fl v 59Displays non-printing characters so they are visible. 60Control characters print line 61.Ql ^X 62for control-X; the delete 63character (octal 0177) prints as 64.Ql ^? 65Non-ascii characters (with the high bit set) are printed as 66.Ql M- 67(for meta) followed by the character for the low 7 bits. 68.El 69.Pp 70The 71.Nm cat 72utility exits 0 on success, and >0 if an error occurs. 73.Sh BUGS 74Because of the shell language mechanism used to perform output 75redirection, the command 76.Dq Li cat file1 file 2 > file1 77will cause the original data in file1 to be destroyed! 78.Sh SEE ALSO 79.Xr head 1 , 80.Xr more 1 , 81.Xr pr 1 , 82.Xr tail 1 83.Rs 84.%A Rob Pike 85.%T "UNIX Style, or cat -v Considered Harmful" 86.%J "USENIX Summer Conference Proceedings" 87.%D 1983 88.Re 89.Sh HISTORY 90A 91.Nm 92command appeared in Version 6 AT&T UNIX. 93