Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ./../../../../../../usr/./man/man1/cat.1
Real path: /usr/share/man/man1/cat.1
Zurück
'\" te .\" Portions Copyright (c) 2008, 2020, Oracle and/or its affiliates. .\" Copyright (c) 1989, AT&T. All rights reserved. .\" Portions Copyright (c) 1992, The X/Open Company Ltd. All rights reserved. .\" Portions Copyright (c) 1982, 2007, AT&T Knowledge Ventures. .\" Oracle gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at http://www.opengroup.org/bookstore/. .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. This notice shall appear on any product containing this material. .TH cat 1 "19 Sep 2020" "Oracle Solaris 11.4" "User Commands" .SH NAME cat \- concatenate and display files .SH SYNOPSIS .LP .nf \fB/usr/bin/cat\fR [\fB-nbsuvet\fR] [\fIfile\fR...] .fi .SH DESCRIPTION .sp .LP The \fBcat\fR utility reads each \fIfile\fR in sequence and writes its contents on the standard output. Thus: .sp .in +2 .nf example% \fBcat file\fR .fi .in -2 .sp .sp .LP prints the contents of \fIfile\fR on your terminal, and: .sp .in +2 .nf example% \fBcat file1 file2 >file3\fR .fi .in -2 .sp .sp .LP concatenates \fIfile1\fR and \fIfile2\fR, and writes the results in \fIfile3\fR. If no input file is given, \fBcat\fR reads from the standard input stream. .SH OPTIONS .sp .LP The following options are supported by \fB/usr/bin/cat\fR: .sp .ne 2 .mk .na \fB\fB-b\fR\fR .ad .RS 6n .rt Number the lines, as \fB-n\fR, but omit the line numbers from blank lines. .RE .sp .ne 2 .mk .na \fB\fB-n\fR\fR .ad .RS 6n .rt Precede each line output with its line number. .RE .sp .ne 2 .mk .na \fB\fB-s\fR\fR .ad .RS 6n .rt \fBcat\fR is silent about non-existent files. .RE .sp .ne 2 .mk .na \fB\fB-u\fR\fR .ad .RS 6n .rt The output is not buffered. .sp Buffered output is the default. .RE .sp .ne 2 .mk .na \fB\fB-v\fR\fR .ad .RS 6n .rt Non-printing characters, with the exception of tabs, \fBNEWLINE\fRs and form feeds, are printed visibly. ASCII control characters (octal \fB000\fR - \fB037\fR) are printed as \fB^\fR\fIn\fR, where \fIn\fR is the corresponding ASCII character in the range octal 100 - 137 (@, A, B, C, . . ., X, Y, Z, [, \e, ], ^, and _); the \fBDEL\fR character (octal \fB0177\fR) is printed \fB^?\fR. Other non-printable characters are printed as \fBM-\fR\fIx\fR, where \fIx\fR is the \fBASCII\fR character specified by the low-order seven bits. .RE .sp .LP When used with the \fB-v\fR option, the following options can be used: .sp .ne 2 .mk .na \fB\fB-e\fR\fR .ad .RS 6n .rt A \fB$\fR character is printed at the end of each line, prior to the \fBNEWLINE\fR. .RE .sp .ne 2 .mk .na \fB\fB-t\fR\fR .ad .RS 6n .rt Tabs are printed as \fB^I\fRs and form feeds to be printed as \fB^L\fRs. .RE .sp .LP The \fB-e\fR and \fB-t\fR options are ignored if the \fB-v\fR option is not specified. .SH OPERANDS .sp .LP The following operand is supported: .sp .ne 2 .mk .na \fB\fIfile\fR\fR .ad .RS 8n .rt A path name of an input file. If no \fIfile\fR is specified, the standard input is used. If \fIfile\fR is \fB\|\(mi\|\fR, \fBcat\fR reads from the standard input at that point in the sequence. \fBcat\fR does not close and reopen standard input when it is referenced in this way, but accepts multiple occurrences of \fB\|\(mi\|\fR as \fIfile\fR. .RE .SH EXAMPLES .LP \fBExample 1\fR Concatenating a File .sp .LP The following command writes the contents of the file \fBmyfile\fR to standard output: .sp .in +2 .nf example% \fBcat myfile\fR .fi .in -2 .sp .LP \fBExample 2\fR Concatenating Two files into One .sp .LP The following command concatenates the files \fBdoc1\fR and \fBdoc2\fR and writes the result to \fBdoc.all\fR. .sp .in +2 .nf example% \fBcat doc1 doc2 > doc.all\fR .fi .in -2 .sp .LP \fBExample 3\fR Concatenating Two Arbitrary Pieces of Input with a Single Invocation .sp .LP When standard input is a terminal, the following command gets two arbitrary pieces of input from the terminal with a single invocation of \fBcat\fR: .sp .in +2 .nf example% \fBcat start - middle - end > file\fR .fi .in -2 .sp .sp .LP However, if standard input is a regular file, the above command would be equivalent to the following command: .sp .in +2 .nf example% \fBcat start - middle /dev/null end > file\fR .fi .in -2 .sp .sp .LP because the entire contents of the file would be consumed by \fBcat\fR the first time \fB\|\(mi\|\fR was used as a \fIfile\fR operand and an end-of-file condition would be detected immediately when \fB\|\(mi\|\fR was referenced the second time. .SH ENVIRONMENT VARIABLES .sp .LP See \fBenviron\fR(7) for descriptions of the following environment variables that affect the execution of \fBcat\fR: \fBLANG\fR, \fBLC_ALL\fR, \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR. .SH EXIT STATUS .sp .LP The following exit values are returned: .sp .ne 2 .mk .na \fB\fB0\fR\fR .ad .RS 7n .rt All input files were output successfully. .RE .sp .ne 2 .mk .na \fB\fB> 0\fR\fR .ad .RS 7n .rt An error occurred. .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(7) for descriptions of the following attributes: .sp .TS tab( ) box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPE ATTRIBUTE VALUE _ Availability system/core-os _ CSI Enabled _ Interface Stability Committed _ Standard See \fBstandards\fR(7). .TE .sp .SH SEE ALSO .sp .LP \fBtac\fR(1), \fBtouch\fR(1), \fBattributes\fR(7), \fBenviron\fR(7), \fBstandards\fR(7) .SH NOTES .sp .LP Redirecting the output of \fBcat\fR onto one of the files being read causes the loss of the data originally in the file being read. For example, .sp .in +2 .nf example% \fBcat filename1 filename2 > filename1\fR .fi .in -2 .sp .sp .LP causes the original data in \fBfilename1\fR to be lost.