Print this page
13507 some man pages need update following 13405
6308 some man pages are obsolete after moving to ksh builtins


  26 .\"
  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.
  30 .\"
  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.
  35 .\"
  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]
  41 .\"
  42 .\"
  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

  46 .\"
  47 .TH TEE 1 "Nov 20, 2007"
  48 .SH NAME
  49 tee \- replicate the standard output
  50 .SH SYNOPSIS
  51 .SS "/usr/bin/tee"
  52 .LP
  53 .nf
  54 \fB/usr/bin/tee\fR [\fB-ai\fR] [\fIfile\fR]...
  55 .fi
  56 
  57 .SS "ksh93"
  58 .LP
  59 .nf
  60 \fBtee\fR [\fB-ail\fR] [\fIfile\fR]...
  61 .fi
  62 
  63 .SH DESCRIPTION
  64 .SS "/usr/bin/tee"
  65 .sp
  66 .LP
  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.
  70 .SS "ksh93"
  71 .sp
  72 .LP
  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
  76 executable.
  77 .sp
  78 .LP
  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
  83 exit status.
  84 .sp
  85 .LP
  86 The number of \fIfile\fR operands that can be specified is limited by the
  87 underlying operating system.
  88 .SH OPTIONS
  89 .SS "/usr/bin/tee"
  90 .sp
  91 .LP
  92 The following options are supported by \fB/usr/bin/tee\fR:
  93 .sp
  94 .ne 2
  95 .na
  96 \fB\fB-a\fR\fR
  97 .ad
  98 .RS 6n






  99 Appends the output to the files rather than overwriting them.
 100 .RE
 101 
 102 .sp
 103 .ne 2
 104 .na
 105 \fB\fB-i\fR\fR
 106 .ad
 107 .RS 6n
 108 Ignores interrupts.
 109 .RE
 110 
 111 .SS "ksh93"
 112 .sp
 113 .LP
 114 The following options are supported by the \fBtee\fR built-in command in
 115 \fBksh93\fR:
 116 .sp
 117 .ne 2
 118 .na
 119 \fB\fB-a\fR\fR
 120 .ad
 121 .br
 122 .na
 123 \fB\fB--append\fR\fR
 124 .ad
 125 .RS 23n
 126 Appends the output to the files rather than overwriting them.
 127 .RE
 128 
 129 .sp
 130 .ne 2
 131 .na
 132 \fB\fB-i\fR\fR
 133 .ad
 134 .br
 135 .na
 136 \fB\fB--ignore-interrupts\fR\fR
 137 .ad
 138 .RS 23n
 139 Ignores \fBSIGINT\fR signal.
 140 .RE
 141 
 142 .sp
 143 .ne 2
 144 .na
 145 \fB\fB-l\fR\fR
 146 .ad
 147 .br
 148 .na
 149 \fB\fB--line-buffer\fR\fR
 150 .ad
 151 .RS 23n
 152 Sets the standard output to be line buffered.
 153 .RE
 154 
 155 .SH OPERANDS
 156 .sp
 157 .LP
 158 The following operands are supported:
 159 .sp
 160 .ne 2
 161 .na
 162 \fB\fIfile\fR\fR
 163 .ad
 164 .RS 8n
 165 A path name of an output file. Processing of at least 13 \fIfile\fR operands
 166 are supported.
 167 .RE
 168 
 169 .SH USAGE
 170 .sp
 171 .LP
 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
 175 .sp
 176 .LP
 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.
 180 .SH EXIT STATUS
 181 .SS "/usr/bin/tee"
 182 .sp
 183 .LP
 184 The following exit values are returned by \fB/usr/bin/tee\fR:
 185 .sp
 186 .ne 2
 187 .na
 188 \fB\fB0\fR\fR
 189 .ad
 190 .RS 6n
 191 The standard input was successfully copied to all output files.
 192 .RE
 193 
 194 .sp
 195 .ne 2
 196 .na
 197 \fB\fB>0\fR\fR
 198 .ad
 199 .RS 6n
 200 The number of files that could not be opened or whose status could not be
 201 obtained.
 202 .RE
 203 
 204 .SS "ksh93"
 205 .sp
 206 .LP
 207 The following exit values are returned by \fBtee\fR in \fBksh93\fR:
 208 .sp
 209 .ne 2
 210 .na
 211 \fB\fB0\fR\fR
 212 .ad
 213 .RS 6n
 214 Successful completion.
 215 .RE
 216 
 217 .sp
 218 .ne 2
 219 .na
 220 \fB\fB>0\fR\fR
 221 .ad
 222 .RS 6n
 223 An error occurred.
 224 .RE
 225 
 226 .SH ATTRIBUTES
 227 .sp
 228 .LP
 229 See \fBattributes\fR(5) for descriptions of the following attributes:
 230 .SS "/usr/bin/tee"
 231 .sp
 232 
 233 .sp
 234 .TS
 235 box;
 236 c | c
 237 l | l .
 238 ATTRIBUTE TYPE  ATTRIBUTE VALUE
 239 _
 240 CSI     Enabled
 241 _
 242 Interface Stability     Committed
 243 _
 244 Standard        See \fBstandards\fR(5).
 245 .TE
 246 
 247 .SS "ksh93"
 248 .sp
 249 
 250 .sp
 251 .TS
 252 box;
 253 c | c
 254 l | l .
 255 ATTRIBUTE TYPE  ATTRIBUTE VALUE
 256 _
 257 Interface Stability     See below.
 258 .TE
 259 
 260 .sp
 261 .LP
 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.
 264 .SH SEE ALSO
 265 .sp
 266 .LP
 267 \fBcat\fR(1), \fBksh93\fR(1), \fBattributes\fR(5), \fBenviron\fR(5),
 268 \fBlargefile\fR(5), \fBstandards\fR(5)


  26 .\"
  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.
  30 .\"
  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.
  35 .\"
  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]
  41 .\"
  42 .\"
  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
  46 .\" Portions Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
  47 .\"
  48 .Dd Feb 9, 2021
  49 .Dt TEE 1
  50 .Os
  51 .Sh NAME
  52 .Nm tee
  53 .Nd replicate the standard output
  54 .Sh SYNOPSIS
  55 .Nm
  56 .Op Fl ail
  57 .Oo Ar file Oc Ns ...
  58 .Sh DESCRIPTION
  59 .Nm
  60 copies standard input to standard output, making a copy in zero or more files.
  61 .Nm
  62 does not buffer its output by default
  63 .Po but see the Fl l No option Pc .
  64 The options determine if the specified files are overwritten or appended to.
  65 If a write to a file fails,
  66 .Nm
  67 continues to write to other files although it exits with a non-zero
















  68 exit status.
  69 .Ss ksh93
  70 The
  71 .Nm
  72 built-in in
  73 .Xr ksh93 1
  74 is associated with the
  75 .Pa /bin
  76 and
  77 .Pa /usr/bin
  78 paths.
  79 It is invoked when
  80 .Nm
  81 is executed without a pathname prefix and the pathname search finds a
  82 .Pa /bin/tee
  83 or
  84 .Pa /usr/bin/tee
  85 executable.
  86 .Sh OPTIONS
  87 The following options are supported:
  88 .Bl -tag -width Ar
  89 .It Fl a Ns \&, Fl \-append
  90 Appends the output to the files rather than overwriting them.
  91 .It Fl i Ns \&, Fl \-ignore-interrupts
  92 Ignores
  93 .Sy SIGINT
  94 signal.
  95 .It Fl l Ns \&, Fl \-linebuffer















































  96 Sets the standard output to be line buffered.
  97 .El
  98 .Sh OPERANDS



  99 The following operands are supported:
 100 .Bl -tag -width Ar
 101 .It Ar file
 102 A path name of an output file.
 103 Processing of at least 13
 104 .Ar file
 105 operands is supported.
 106 .El
 107 .Sh EXIT STATUS
 108 .Bl -tag -width Ds
 109 .It Sy 0
 110 All files copied successfully.
 111 .It Sy >0




















































 112 An error occurred.
 113 .El
 114 .Sh ENVIRONMENT VARIABLES
 115 See
 116 .Xr environ 5
 117 for descriptions of the following environment variables
 118 that affect the execution of
 119 .Nm :
 120 .Ev LANG ,
 121 .Ev LC_ALL ,
 122 .Ev LC_TYPE ,
 123 .Ev LC_MESSAGES ,
 124 .Ev LC_NUMERIC ,
 125 and
 126 .Ev NLSPATH .
 127 .Sh INTERFACE STABILITY
 128 The command line interface of
 129 .Nm
 130 is
 131 .Sy Committed .
 132 The output of
 133 .Nm
 134 is
 135 .Sy Committed .
 136 The
 137 .Xr ksh93 1
 138 built-in binding to
 139 .Pa /bin
 140 and
 141 .Pa /usr/bin
 142 is
 143 .Sy Volatile .
 144 .Sh SEE ALSO
 145 .Xr cat 1 ,
 146 .Xr ksh93 1 ,
 147 .Xr attributes 5 ,
 148 .Xr environ 5 ,
 149 .Xr largefile 5 ,
 150 .Xr standards 5