2 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for
3 .\" permission to reproduce portions of its copyrighted documentation.
4 .\" Original documentation from The Open Group can be obtained online at
5 .\" http://www.opengroup.org/bookstore/.
7 .\" The Institute of Electrical and Electronics Engineers and The Open
8 .\" Group, have given us permission to reprint portions of their
11 .\" In the following statement, the phrase ``this text'' refers to portions
12 .\" of the system documentation.
14 .\" Portions of this text are reprinted and reproduced in electronic form
15 .\" in the SunOS Reference Manual, from IEEE Std 1003.1, 2004 Edition,
16 .\" Standard for Information Technology -- Portable Operating System
17 .\" Interface (POSIX), The Open Group Base Specifications Issue 6,
18 .\" Copyright (C) 2001-2004 by the Institute of Electrical and Electronics
19 .\" Engineers, Inc and The Open Group. In the event of any discrepancy
20 .\" between these versions and the original IEEE and The Open Group
21 .\" Standard, the original IEEE and The Open Group Standard is the referee
22 .\" document. The original Standard can be obtained online at
23 .\" http://www.opengroup.org/unix/online.html.
25 .\" This notice shall appear on any product containing this material.
27 .\" The contents of this file are subject to the terms of the
28 .\" Common Development and Distribution License (the "License").
29 .\" You may not use this file except in compliance with the License.
31 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
32 .\" or http://www.opensolaris.org/os/licensing.
33 .\" See the License for the specific language governing permissions
34 .\" and limitations under the License.
36 .\" When distributing Covered Code, include this CDDL HEADER in each
37 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
38 .\" If applicable, add the following below this CDDL HEADER, with the
39 .\" fields enclosed by brackets "[]" replaced with your own identifying
40 .\" information: Portions Copyright [yyyy] [name of copyright owner]
43 .\" Copyright 1989 AT&T
44 .\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved.
45 .\" Portions Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
47 .TH TEE 1 "Nov 20, 2007"
49 tee \- replicate the standard output
54 \fB/usr/bin/tee\fR [\fB-ai\fR] [\fIfile\fR]...
60 \fBtee\fR [\fB-ail\fR] [\fIfile\fR]...
67 \fB/usr/bin/tee\fR copies standard input to standard output, making a copy in
68 zero or more files. \fBtee\fR does not buffer its output. The options determine
69 if the specified files are overwritten or appended to.
73 The \fBtee\fR built-in in \fBksh93\fR is associated with the \fB/bin\fR and
74 \fB/usr/bin\fR paths. It is invoked when tee is executed without a pathname
75 prefix and the pathname search finds a \fB/bin/tee\fR or \fB/usr/bin/tee\fR
79 \fBtee\fR copies standard input to standard output and to zero or more files.
80 The options determine whether the specified files are overwritten or appended
81 to. The tee utility does not buffer output. If a write to a file fails,
82 \fBtee\fR continues to write to other files although it exits with a non-zero
86 The number of \fIfile\fR operands that can be specified is limited by the
87 underlying operating system.
92 The following options are supported by \fB/usr/bin/tee\fR:
99 Appends the output to the files rather than overwriting them.
114 The following options are supported by the \fBtee\fR built-in command in
126 Appends the output to the files rather than overwriting them.
136 \fB\fB--ignore-interrupts\fR\fR
139 Ignores \fBSIGINT\fR signal.
149 \fB\fB--line-buffer\fR\fR
152 Sets the standard output to be line buffered.
158 The following operands are supported:
165 A path name of an output file. Processing of at least 13 \fIfile\fR operands
172 See \fBlargefile\fR(5) for the description of the behavior of \fBtee\fR when
173 encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
174 .SH ENVIRONMENT VARIABLES
177 See \fBenviron\fR(5) for descriptions of the following environment variables
178 that affect the execution of \fBtee\fR: \fBLANG\fR, \fBLC_ALL\fR,
179 \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
184 The following exit values are returned by \fB/usr/bin/tee\fR:
191 The standard input was successfully copied to all output files.
200 The number of files that could not be opened or whose status could not be
207 The following exit values are returned by \fBtee\fR in \fBksh93\fR:
214 Successful completion.
229 See \fBattributes\fR(5) for descriptions of the following attributes:
238 ATTRIBUTE TYPE ATTRIBUTE VALUE
242 Interface Stability Committed
244 Standard See \fBstandards\fR(5).
255 ATTRIBUTE TYPE ATTRIBUTE VALUE
257 Interface Stability See below.
262 The \fBksh93\fR built-in binding to \fB/bin\fR and \fB/usr/bin\fR is Volatile.
263 The built-in interfaces are Uncommitted.
267 \fBcat\fR(1), \fBksh93\fR(1), \fBattributes\fR(5), \fBenviron\fR(5),
268 \fBlargefile\fR(5), \fBstandards\fR(5)