9070 Remove wanboot from gate
[unleashed.git] / usr / src / man / man1 / tee.1
blobbd809355175c4ee64be81251bad7c5d572041e1d
1 '\" te
2 .\" Copyright 1989 AT&T
3 .\" Copyright (c) 1992, X/Open Company Limited All Rights Reserved
4 .\" Portions Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
5 .\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
6 .\" Sun Microsystems, Inc. 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
7 .\" http://www.opengroup.org/bookstore/.
8 .\" 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.
9 .\"  This notice shall appear on any product containing this material.
10 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
11 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
12 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
13 .TH TEE 1 "Nov 20, 2007"
14 .SH NAME
15 tee \- replicate the standard output
16 .SH SYNOPSIS
17 .SS "/usr/bin/tee"
18 .LP
19 .nf
20 \fB/usr/bin/tee\fR [\fB-ai\fR] [\fIfile\fR]...
21 .fi
23 .SS "ksh93"
24 .LP
25 .nf
26 \fBtee\fR [\fB-ail\fR] [\fIfile\fR]...
27 .fi
29 .SH DESCRIPTION
30 .SS "/usr/bin/tee"
31 .sp
32 .LP
33 \fB/usr/bin/tee\fR copies standard input to standard output, making a copy in
34 zero or more files. \fBtee\fR does not buffer its output. The options determine
35 if the specified files are overwritten or appended to.
36 .SS "ksh93"
37 .sp
38 .LP
39 The \fBtee\fR built-in in \fBksh93\fR is associated with the \fB/bin\fR and
40 \fB/usr/bin\fR paths. It is invoked when tee is executed without a pathname
41 prefix and the pathname search finds a \fB/bin/tee\fR or \fB/usr/bin/tee\fR
42 executable.
43 .sp
44 .LP
45 \fBtee\fR copies standard input to standard output and to zero or more files.
46 The options determine whether the specified files are overwritten or appended
47 to. The tee utility does not buffer output. If a write to a file fails,
48 \fBtee\fR continues to write to other files although it exits with a non-zero
49 exit status.
50 .sp
51 .LP
52 The number of \fIfile\fR operands that can be specified is limited by the
53 underlying operating system.
54 .SH OPTIONS
55 .SS "/usr/bin/tee"
56 .sp
57 .LP
58 The following options are supported by \fB/usr/bin/tee\fR:
59 .sp
60 .ne 2
61 .na
62 \fB\fB-a\fR\fR
63 .ad
64 .RS 6n
65 Appends the output to the files rather than overwriting them.
66 .RE
68 .sp
69 .ne 2
70 .na
71 \fB\fB-i\fR\fR
72 .ad
73 .RS 6n
74 Ignores interrupts.
75 .RE
77 .SS "ksh93"
78 .sp
79 .LP
80 The following options are supported by the \fBtee\fR built-in command in
81 \fBksh93\fR:
82 .sp
83 .ne 2
84 .na
85 \fB\fB-a\fR\fR
86 .ad
87 .br
88 .na
89 \fB\fB--append\fR\fR
90 .ad
91 .RS 23n
92 Appends the output to the files rather than overwriting them.
93 .RE
95 .sp
96 .ne 2
97 .na
98 \fB\fB-i\fR\fR
99 .ad
102 \fB\fB--ignore-interrupts\fR\fR
104 .RS 23n
105 Ignores \fBSIGINT\fR signal.
109 .ne 2
111 \fB\fB-l\fR\fR
115 \fB\fB--line-buffer\fR\fR
117 .RS 23n
118 Sets the standard output to be line buffered.
121 .SH OPERANDS
124 The following operands are supported:
126 .ne 2
128 \fB\fIfile\fR\fR
130 .RS 8n
131 A path name of an output file. Processing of at least 13 \fIfile\fR operands
132 are supported.
135 .SH USAGE
138 See \fBlargefile\fR(5) for the description of the behavior of \fBtee\fR when
139 encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
140 .SH ENVIRONMENT VARIABLES
143 See \fBenviron\fR(5) for descriptions of the following environment variables
144 that affect the execution of \fBtee\fR: \fBLANG\fR, \fBLC_ALL\fR,
145 \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
146 .SH EXIT STATUS
147 .SS "/usr/bin/tee"
150 The following exit values are returned by \fB/usr/bin/tee\fR:
152 .ne 2
154 \fB\fB0\fR\fR
156 .RS 6n
157 The standard input was successfully copied to all output files.
161 .ne 2
163 \fB\fB>0\fR\fR
165 .RS 6n
166 The number of files that could not be opened or whose status could not be
167 obtained.
170 .SS "ksh93"
173 The following exit values are returned by \fBtee\fR in \fBksh93\fR:
175 .ne 2
177 \fB\fB0\fR\fR
179 .RS 6n
180 Successful completion.
184 .ne 2
186 \fB\fB>0\fR\fR
188 .RS 6n
189 An error occurred.
192 .SH ATTRIBUTES
195 See \fBattributes\fR(5) for descriptions of the following attributes:
196 .SS "/usr/bin/tee"
201 box;
202 c | c
203 l | l .
204 ATTRIBUTE TYPE  ATTRIBUTE VALUE
206 CSI     Enabled
208 Interface Stability     Committed
210 Standard        See \fBstandards\fR(5).
213 .SS "ksh93"
218 box;
219 c | c
220 l | l .
221 ATTRIBUTE TYPE  ATTRIBUTE VALUE
223 Interface Stability     See below.
228 The \fBksh93\fR built-in binding to \fB/bin\fR and \fB/usr/bin\fR is Volatile.
229 The built-in interfaces are Uncommitted.
230 .SH SEE ALSO
233 \fBcat\fR(1), \fBksh93\fR(1), \fBattributes\fR(5), \fBenviron\fR(5),
234 \fBlargefile\fR(5), \fBstandards\fR(5)