94 lines
2.0 KiB
HTML
94 lines
2.0 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
|
<html>
|
|
<head>
|
|
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
|
<meta http-equiv="Content-Type" content=
|
|
"text/html; charset=utf-8">
|
|
<title>tee - Duplicate standard input</title>
|
|
<LINK rel="stylesheet" type="text/css" href="../rzahg/ic.css">
|
|
</HEAD>
|
|
<body bgcolor="#FFFFFF">
|
|
<!-- Java sync-link -->
|
|
<SCRIPT LANGUAGE="Javascript" SRC="../rzahg/synch.js" TYPE="text/javascript"></SCRIPT>
|
|
|
|
<h2>tee - Duplicate standard input</h2>
|
|
|
|
<p><strong>Synopsis</strong></p>
|
|
|
|
<p><strong>tee [-ai]</strong> [<em>file</em> ...]</p>
|
|
|
|
<p><strong>Description</strong></p>
|
|
|
|
<p>The <strong>tee</strong> utility copies standard input to
|
|
standard output, making a copy in zero or more <em>files</em>. The
|
|
output is unbuffered.</p>
|
|
|
|
<p>The <strong>tee</strong> utility takes the default action for
|
|
all signals, except when the <strong>-i</strong> option is
|
|
specified.</p>
|
|
|
|
<p><strong>Options</strong></p>
|
|
|
|
<dl>
|
|
<dt><strong>-a</strong></dt>
|
|
|
|
<dd>Append the output to the files rather than overwriting
|
|
them.</dd>
|
|
|
|
<dt><strong>-i</strong></dt>
|
|
|
|
<dd>Ignore the SIGINT signal.</dd>
|
|
</dl>
|
|
|
|
|
|
<p><strong>Environment Variables</strong></p>
|
|
|
|
<p><strong>tee</strong> is affected by the following environment
|
|
variables:</p>
|
|
|
|
<dl>
|
|
<dt><strong>QIBM_CCSID</strong></dt>
|
|
|
|
<dd>The files created by <strong>tee</strong> are created with the CCSID specified by
|
|
the value of the environment variable.</dd>
|
|
</dl>
|
|
|
|
|
|
<p><strong>Exit Status</strong></p>
|
|
|
|
<ul>
|
|
<li>0 on success</li>
|
|
|
|
<li>>0 if an error occurs</li>
|
|
</ul>
|
|
|
|
<p><strong>Related information</strong></p>
|
|
|
|
<ul>
|
|
<li><a href="echo.htm">echo - Write arguments to standard
|
|
output</a></li>
|
|
</ul>
|
|
|
|
<strong>Examples</strong>
|
|
|
|
<ol>
|
|
<li>Save the output of a command into three different files.
|
|
|
|
<pre>
|
|
grep 'off_set=' code/*.java | tee file1 file2 file3 > logfile
|
|
</pre>
|
|
</li>
|
|
|
|
<li>Make a working and backup copy of the file, "back9".
|
|
|
|
<pre>
|
|
cat back9 | tee pro.tees pro.tees.bak
|
|
</pre>
|
|
</li>
|
|
</ol>
|
|
|
|
<!-- end ibmbody========================================================= -->
|
|
</body>
|
|
</html>
|
|
|