xref: /freebsd/usr.bin/tee/tee.1 (revision bdcbfde31e8e9b343f113a1956384bdf30d1ed62)
19b50d902SRodney W. Grimes.\" Copyright (c) 1991, 1993
29b50d902SRodney W. Grimes.\"	The Regents of the University of California.  All rights reserved.
39b50d902SRodney W. Grimes.\"
49b50d902SRodney W. Grimes.\" This code is derived from software contributed to Berkeley by
59b50d902SRodney W. Grimes.\" the Institute of Electrical and Electronics Engineers, Inc.
69b50d902SRodney W. Grimes.\"
79b50d902SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without
89b50d902SRodney W. Grimes.\" modification, are permitted provided that the following conditions
99b50d902SRodney W. Grimes.\" are met:
109b50d902SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright
119b50d902SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer.
129b50d902SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright
139b50d902SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer in the
149b50d902SRodney W. Grimes.\"    documentation and/or other materials provided with the distribution.
15fbbd9655SWarner Losh.\" 3. Neither the name of the University nor the names of its contributors
169b50d902SRodney W. Grimes.\"    may be used to endorse or promote products derived from this software
179b50d902SRodney W. Grimes.\"    without specific prior written permission.
189b50d902SRodney W. Grimes.\"
199b50d902SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
209b50d902SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
219b50d902SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
229b50d902SRodney W. Grimes.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
239b50d902SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
249b50d902SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
259b50d902SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
269b50d902SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
279b50d902SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
289b50d902SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
299b50d902SRodney W. Grimes.\" SUCH DAMAGE.
309b50d902SRodney W. Grimes.\"
31*514df635SGordon Bergling.Dd October 30, 2022
329b50d902SRodney W. Grimes.Dt TEE 1
339b50d902SRodney W. Grimes.Os
349b50d902SRodney W. Grimes.Sh NAME
359b50d902SRodney W. Grimes.Nm tee
3695d0af0cSRuslan Ermilov.Nd duplicate standard input
379b50d902SRodney W. Grimes.Sh SYNOPSIS
38c10d7afbSPhilippe Charnier.Nm
399b50d902SRodney W. Grimes.Op Fl ai
40c10d7afbSPhilippe Charnier.Op Ar
419b50d902SRodney W. Grimes.Sh DESCRIPTION
429b50d902SRodney W. GrimesThe
43c10d7afbSPhilippe Charnier.Nm
449b50d902SRodney W. Grimesutility copies standard input to standard output,
459b50d902SRodney W. Grimesmaking a copy in zero or more files.
469b50d902SRodney W. GrimesThe output is unbuffered.
479b50d902SRodney W. Grimes.Pp
489b50d902SRodney W. GrimesThe following options are available:
4995d0af0cSRuslan Ermilov.Bl -tag -width indent
509b50d902SRodney W. Grimes.It Fl a
519b50d902SRodney W. GrimesAppend the output to the files rather than
529b50d902SRodney W. Grimesoverwriting them.
539b50d902SRodney W. Grimes.It Fl i
549b50d902SRodney W. GrimesIgnore the
559b50d902SRodney W. Grimes.Dv SIGINT
569b50d902SRodney W. Grimessignal.
579b50d902SRodney W. Grimes.El
589b50d902SRodney W. Grimes.Pp
599b50d902SRodney W. GrimesThe following operands are available:
6095d0af0cSRuslan Ermilov.Bl -tag -width indent
61c10d7afbSPhilippe Charnier.It Ar file
629b50d902SRodney W. GrimesA pathname of an output
639b50d902SRodney W. Grimes.Ar file .
649b50d902SRodney W. Grimes.El
659b50d902SRodney W. Grimes.Pp
669b50d902SRodney W. GrimesThe
67c10d7afbSPhilippe Charnier.Nm
689b50d902SRodney W. Grimesutility takes the default action for all signals,
699b50d902SRodney W. Grimesexcept in the event of the
709b50d902SRodney W. Grimes.Fl i
719b50d902SRodney W. Grimesoption.
72a866e170SRuslan Ermilov.Sh EXIT STATUS
73d628d776SRuslan Ermilov.Ex -std
74d70bfeddSFernando Apesteguía.Sh EXAMPLES
759ec57102SMateusz PiotrowskiSend the echoed message both to stdout and to the
76fcc879adSFernando Apesteguía.Pa greetings.txt
77fcc879adSFernando Apesteguíafile:
78d70bfeddSFernando Apesteguía.Bd -literal -offset indent
79d70bfeddSFernando Apesteguía$ echo "Hello" | tee greetings.txt
80d70bfeddSFernando ApesteguíaHello
81d70bfeddSFernando Apesteguía.Ed
829b50d902SRodney W. Grimes.Sh STANDARDS
839b50d902SRodney W. GrimesThe
84c10d7afbSPhilippe Charnier.Nm
85dbb9d8f8SPhilippe Charnierutility is expected to be
869b50d902SRodney W. Grimes.St -p1003.2
879b50d902SRodney W. Grimescompatible.
88*514df635SGordon Bergling.Sh HISTORY
89*514df635SGordon BerglingThe
90*514df635SGordon Bergling.Nm
91*514df635SGordon Berglingcommand first appeared in
92*514df635SGordon Bergling.At v7 .
93