<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://www.freebsdwiki.net/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://www.freebsdwiki.net/index.php?action=history&amp;feed=atom&amp;title=Redirection</id>
		<title>Redirection - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://www.freebsdwiki.net/index.php?action=history&amp;feed=atom&amp;title=Redirection"/>
		<link rel="alternate" type="text/html" href="http://www.freebsdwiki.net/index.php?title=Redirection&amp;action=history"/>
		<updated>2026-05-01T04:12:39Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.18.0</generator>

	<entry>
		<id>http://www.freebsdwiki.net/index.php?title=Redirection&amp;diff=9677&amp;oldid=prev</id>
		<title>Jimbo: Reverted edits by 193.28.153.27 (Talk); changed back to last version by 24.20.109.51</title>
		<link rel="alternate" type="text/html" href="http://www.freebsdwiki.net/index.php?title=Redirection&amp;diff=9677&amp;oldid=prev"/>
				<updated>2007-12-31T22:32:47Z</updated>
		
		<summary type="html">&lt;p&gt;Reverted edits by &lt;a href=&quot;/index.php/Special:Contributions/193.28.153.27&quot; title=&quot;Special:Contributions/193.28.153.27&quot;&gt;193.28.153.27&lt;/a&gt; (&lt;a href=&quot;/index.php?title=User_talk:193.28.153.27&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;User talk:193.28.153.27 (page does not exist)&quot;&gt;Talk&lt;/a&gt;); changed back to last version by &lt;a href=&quot;/index.php?title=User:24.20.109.51&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;User:24.20.109.51 (page does not exist)&quot;&gt;24.20.109.51&lt;/a&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='1' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='1' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 22:32, 31 December 2007&lt;/td&gt;
		&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Jimbo</name></author>	</entry>

	<entry>
		<id>http://www.freebsdwiki.net/index.php?title=Redirection&amp;diff=6878&amp;oldid=prev</id>
		<title>24.20.109.51: /* A little more about ''fd n'' in &lt;code&gt;sh&lt;/code&gt; */</title>
		<link rel="alternate" type="text/html" href="http://www.freebsdwiki.net/index.php?title=Redirection&amp;diff=6878&amp;oldid=prev"/>
				<updated>2006-09-13T20:13:52Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;A little more about &amp;#039;&amp;#039;fd n&amp;#039;&amp;#039; in &amp;lt;code&amp;gt;sh&amp;lt;/code&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 20:13, 13 September 2006&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 141:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 141:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;So, what you'll see on your screen is the output of ''myprogram'' on &amp;lt;code&amp;gt;stderr&amp;lt;/code&amp;gt; (not passed to ''command''), followed by errors (if any) from ''command''.&amp;#160; In short, what's been accomplished is, a swap of errors for output, from ''myprogram'' to ''command'', the output of which is redirected to ''errors.txt''.&amp;#160; There is no reliable way to do the same thing in &amp;lt;code&amp;gt;tcsh&amp;lt;/code&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;So, what you'll see on your screen is the output of ''myprogram'' on &amp;lt;code&amp;gt;stderr&amp;lt;/code&amp;gt; (not passed to ''command''), followed by errors (if any) from ''command''.&amp;#160; In short, what's been accomplished is, a swap of errors for output, from ''myprogram'' to ''command'', the output of which is redirected to ''errors.txt''.&amp;#160; There is no reliable way to do the same thing in &amp;lt;code&amp;gt;tcsh&amp;lt;/code&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Also, see the [http://www.freebsd.org/cgi/man.cgi?query=mkfifo&amp;amp;apropos=0&amp;amp;sektion=1&amp;amp;manpath=FreeBSD+6.1-RELEASE&amp;amp;format=html man page] for [[mkfifo]], a utility for creating arbitrary &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;file descriptor &lt;/del&gt;files.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Also, see the [http://www.freebsd.org/cgi/man.cgi?query=mkfifo&amp;amp;apropos=0&amp;amp;sektion=1&amp;amp;manpath=FreeBSD+6.1-RELEASE&amp;amp;format=html man page] for [[mkfifo]], a utility for creating arbitrary &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[[FIFO]] &lt;/ins&gt;files.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Category:FreeBSD Terminology]] [[Category:Common Tasks]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Category:FreeBSD Terminology]] [[Category:Common Tasks]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key bsdwiki:diff:version:1.11a:oldid:6742:newid:6878 --&gt;
&lt;/table&gt;</summary>
		<author><name>24.20.109.51</name></author>	</entry>

	<entry>
		<id>http://www.freebsdwiki.net/index.php?title=Redirection&amp;diff=6742&amp;oldid=prev</id>
		<title>Ninereasons: /* Shell pipelines and redirection */</title>
		<link rel="alternate" type="text/html" href="http://www.freebsdwiki.net/index.php?title=Redirection&amp;diff=6742&amp;oldid=prev"/>
				<updated>2006-07-12T21:45:56Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Shell pipelines and redirection&lt;/span&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 21:45, 12 July 2006&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 34:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 34:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Redirection means that, the file descriptor is temporarily reassigned to somewhere other than the terminal device (a file, a pipe, another file descriptor).&amp;#160; When the next process inherits the open ''fd'' from the shell the stream of data is passed along, for example, by writing to &amp;lt;code&amp;gt;stdout&amp;lt;/code&amp;gt;, which has been temporarily reassigned to the &amp;lt;code&amp;gt;stdin&amp;lt;/code&amp;gt; for the next process by means of a ''pipe'' ('''|''').&amp;#160; This handing off of open file descriptors by the shell, from one sub-process to another, is called a &amp;quot;shell pipeline&amp;quot;.&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Redirection means that, the file descriptor is temporarily reassigned to somewhere other than the terminal device (a file, a pipe, another file descriptor).&amp;#160; When the next process inherits the open ''fd'' from the shell the stream of data is passed along, for example, by writing to &amp;lt;code&amp;gt;stdout&amp;lt;/code&amp;gt;, which has been temporarily reassigned to the &amp;lt;code&amp;gt;stdin&amp;lt;/code&amp;gt; for the next process by means of a ''pipe'' ('''|''').&amp;#160; This handing off of open file descriptors by the shell, from one sub-process to another, is called a &amp;quot;shell pipeline&amp;quot;.&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;There are ''fd n'' (&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;3&lt;/del&gt;-9) descriptors potentially available, but only 0-2 are preconnected to the shell; the others must be created from the shell.&amp;#160; In some shells, a standard file descriptor can be detached and reassigned to another file descriptor for as long as the terminal device is open,&amp;#160; using the [[exec]] command (examples appear below).&amp;#160; This capability is just one case among many of why &amp;lt;code&amp;gt;sh&amp;lt;/code&amp;gt; is useful for scripting, and &amp;lt;code&amp;gt;tcsh&amp;lt;/code&amp;gt; (which lacks it) is not (''see the [http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/ FAQ]).&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;There are ''fd n'' (&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;0&lt;/ins&gt;-9) descriptors potentially available, but only 0-2 are preconnected to the shell; the others must be created from the shell.&amp;#160; In some shells, a standard file descriptor can be detached and reassigned to another file descriptor for as long as the terminal device is open,&amp;#160; using the [[exec]] command (examples appear below).&amp;#160; This capability is just one case among many of why &amp;lt;code&amp;gt;sh&amp;lt;/code&amp;gt; is useful for scripting, and &amp;lt;code&amp;gt;tcsh&amp;lt;/code&amp;gt; (which lacks it) is not (''see the [http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/ FAQ]).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Redirection in &amp;lt;code&amp;gt;sh&amp;lt;/code&amp;gt; compared to &amp;lt;code&amp;gt;tcsh&amp;lt;/code&amp;gt; ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Redirection in &amp;lt;code&amp;gt;sh&amp;lt;/code&amp;gt; compared to &amp;lt;code&amp;gt;tcsh&amp;lt;/code&amp;gt; ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key bsdwiki:diff:version:1.11a:oldid:6708:newid:6742 --&gt;
&lt;/table&gt;</summary>
		<author><name>Ninereasons</name></author>	</entry>

	<entry>
		<id>http://www.freebsdwiki.net/index.php?title=Redirection&amp;diff=6708&amp;oldid=prev</id>
		<title>Ninereasons: change bullets to sub-heads</title>
		<link rel="alternate" type="text/html" href="http://www.freebsdwiki.net/index.php?title=Redirection&amp;diff=6708&amp;oldid=prev"/>
				<updated>2006-06-30T01:28:34Z</updated>
		
		<summary type="html">&lt;p&gt;change bullets to sub-heads&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 01:28, 30 June 2006&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 39:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 39:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The c-shells (&amp;lt;code&amp;gt;tcsh&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;csh&amp;lt;/code&amp;gt;) and the Bourne shells (&amp;lt;code&amp;gt;sh&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt;) do not handle redirection or piping in quite the same way.&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The c-shells (&amp;lt;code&amp;gt;tcsh&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;csh&amp;lt;/code&amp;gt;) and the Bourne shells (&amp;lt;code&amp;gt;sh&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt;) do not handle redirection or piping in quite the same way.&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;* '&lt;/del&gt;''tcsh and &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;sh&lt;/del&gt;'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;=== &lt;/ins&gt;''tcsh&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'' &lt;/ins&gt;and ''&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;sh&lt;/ins&gt;'&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;' ===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;# Write output to a file&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;# Write output to a file&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;#: % mycmd &amp;gt; out.txt&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#: % mycmd &amp;gt; out.txt&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;#:: &amp;lt;span style=color:blue &amp;gt;stderr stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#:: &amp;lt;span style=color:blue &amp;gt;stderr stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;# Append output to a file&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;# Append output to a file&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;#: % mycmd &amp;gt;&amp;gt; out.txt&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#: % mycmd &amp;gt;&amp;gt; out.txt&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;#:: &amp;lt;span style=color:blue &amp;gt;stderr stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#:: &amp;lt;span style=color:blue &amp;gt;stderr stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;# Redirect the output of a remote command to ''local.txt''.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;# Redirect the output of a remote command to ''local.txt''.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;#: % localcmd &amp;quot;remotecmd&amp;quot; &amp;gt; local.txt&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#: % localcmd &amp;quot;remotecmd&amp;quot; &amp;gt; local.txt&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;#:: &amp;lt;span style=color:blue &amp;gt;stderr stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#:: &amp;lt;span style=color:blue &amp;gt;stderr stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;# Same command as above, showing only the changes compared to ''local.txt''.&amp;lt;br /&amp;gt;''Note: Many programs recognize '-' as a shortcut for '/dev/stdin'. These two commands are equivalent. ''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;# Same command as above, showing only the changes compared to ''local.txt''.&amp;lt;br /&amp;gt;''Note: Many programs recognize '-' as a shortcut for '/dev/stdin'. These two commands are equivalent. ''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;#: % localcmd &amp;quot;remotecmd&amp;quot; | diff /dev/stdin local.txt&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#: % localcmd &amp;quot;remotecmd&amp;quot; | diff /dev/stdin local.txt&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;#: % localcmd &amp;quot;remotecmd&amp;quot; | diff - local.txt&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#: % localcmd &amp;quot;remotecmd&amp;quot; | diff - local.txt&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;#:: &amp;lt;span style=color:blue &amp;gt;stderr stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#:: &amp;lt;span style=color:blue &amp;gt;stderr stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;# Direct &amp;lt;code&amp;gt;stdout&amp;lt;/code&amp;gt;+&amp;lt;code&amp;gt;stderr&amp;lt;/code&amp;gt; to file&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;# Direct &amp;lt;code&amp;gt;stdout&amp;lt;/code&amp;gt;+&amp;lt;code&amp;gt;stderr&amp;lt;/code&amp;gt; to file&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;#: % mycmd &amp;gt;&amp;amp; out.txt&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#: % mycmd &amp;gt;&amp;amp; out.txt&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;# Sort lines of jumble.txt into sorted.txt&amp;lt;br /&amp;gt;''Note: the sequence in which redirection appears is not important.&amp;#160; All of the following are exactly equivalent.''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;# Sort lines of jumble.txt into sorted.txt&amp;lt;br /&amp;gt;''Note: the sequence in which redirection appears is not important.&amp;#160; All of the following are exactly equivalent.''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;#: % &amp;lt;jumble.txt sort &amp;gt;sorted.txt&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#: % &amp;lt;jumble.txt sort &amp;gt;sorted.txt&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;#: % &amp;gt;sorted.txt sort &amp;lt;jumble.txt &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#: % &amp;gt;sorted.txt sort &amp;lt;jumble.txt &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;#: % sort &amp;lt; jumble.txt &amp;gt;sorted.txt&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#: % sort &amp;lt; jumble.txt &amp;gt;sorted.txt&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;#: % &amp;lt;jumble.txt&amp;gt;sorted.txt sort&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#: % &amp;lt;jumble.txt&amp;gt;sorted.txt sort&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;#:: &amp;lt;span style=color:blue&amp;gt;stderr stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#:: &amp;lt;span style=color:blue&amp;gt;stderr stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;# Sort unique lines of jumble.txt into sorted.txt&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;# Sort unique lines of jumble.txt into sorted.txt&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;#: % &amp;lt;jumble.txt sort | uniq &amp;gt;sorted.txt&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#: % &amp;lt;jumble.txt sort | uniq &amp;gt;sorted.txt&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;#:: &amp;lt;span style=color:blue&amp;gt;stderr stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#:: &amp;lt;span style=color:blue&amp;gt;stderr stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;# Sort ''HERE doc'' delimited by &amp;quot;lines&amp;quot; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;# Sort ''HERE doc'' delimited by &amp;quot;lines&amp;quot; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;#: % &amp;lt;&amp;lt;lines sort&amp;lt;br /&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#: % &amp;lt;&amp;lt;lines sort&amp;lt;br /&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;#::? a second line&amp;lt;br /&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#::? a second line&amp;lt;br /&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;#::? a first line&amp;lt;br /&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#::? a first line&amp;lt;br /&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;#::lines&amp;lt;br /&amp;gt;&amp;lt;span style=color:green &amp;gt;a first line&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;span style=color:green &amp;gt;a second line&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;span style=color:blue&amp;gt;stderr stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#::lines&amp;lt;br /&amp;gt;&amp;lt;span style=color:green &amp;gt;a first line&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;span style=color:green &amp;gt;a second line&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;span style=color:blue&amp;gt;stderr stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;* '&lt;/del&gt;''tcsh&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;'&lt;/del&gt;'' only&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;=== &lt;/ins&gt;''tcsh'' only &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;# Discard errors, watch output (probably evil)&amp;lt;br /&amp;gt;''Note: There is no reliable way to do this in tcsh. Here we exploit the fact that terminal reads from &amp;lt;code&amp;gt;stdin&amp;lt;/code&amp;gt;.&amp;#160; ''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;# Discard errors, watch output (probably evil)&amp;lt;br /&amp;gt;''Note: There is no reliable way to do this in tcsh. Here we exploit the fact that terminal reads from &amp;lt;code&amp;gt;stdin&amp;lt;/code&amp;gt;.&amp;#160; ''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;#: % ( mycmd &amp;gt; /dev/stdin ) &amp;gt; &amp;amp; /dev/null&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#: % ( mycmd &amp;gt; /dev/stdin ) &amp;gt; &amp;amp; /dev/null&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;#:: &amp;lt;span style=color:green&amp;#160; &amp;gt; stdout stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#:: &amp;lt;span style=color:green&amp;#160; &amp;gt; stdout stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;#: % ( mycmd &amp;gt; /dev/tty ) &amp;gt; &amp;amp; /dev/null&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#: % ( mycmd &amp;gt; /dev/tty ) &amp;gt; &amp;amp; /dev/null&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;#:: &amp;lt;span style=color:green &amp;gt; stdout stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#:: &amp;lt;span style=color:green &amp;gt; stdout stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;# Append output to out.txt; discard messages&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;# Append output to out.txt; discard messages&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;#: % (mycmd &amp;gt;&amp;gt; out.txt) &amp;gt;&amp;amp; /dev/null&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#: % (mycmd &amp;gt;&amp;gt; out.txt) &amp;gt;&amp;amp; /dev/null&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;# Write output to out.txt; store and watch errors&amp;lt;br /&amp;gt;''Note: Compare the same task in ''sh''. ''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;# Write output to out.txt; store and watch errors&amp;lt;br /&amp;gt;''Note: Compare the same task in ''sh''. ''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;#: % ( mycmd &amp;gt; out.txt ) | &amp;amp; tee err.txt&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#: % ( mycmd &amp;gt; out.txt ) | &amp;amp; tee err.txt&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;#:: &amp;lt;span style=color:blue &amp;gt;stderr stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#:: &amp;lt;span style=color:blue &amp;gt;stderr stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;* '&lt;/del&gt;''sh&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;'&lt;/del&gt;'' only&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;=== &lt;/ins&gt;''sh'' only &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;# Discard errors, watch output &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;# Discard errors, watch output &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;#: $&amp;#160; mycmd 2&amp;gt; /dev/null&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#: $&amp;#160; mycmd 2&amp;gt; /dev/null&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;#:: &amp;lt;span style=color:green&amp;#160; &amp;gt; stdout stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#:: &amp;lt;span style=color:green&amp;#160; &amp;gt; stdout stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;# Append output to out.txt; discard messages&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;# Append output to out.txt; discard messages&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;#: $ mycmd 2&amp;gt; /dev/null &amp;gt;&amp;gt; out.txt&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#: $ mycmd 2&amp;gt; /dev/null &amp;gt;&amp;gt; out.txt&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;# Write output to out.txt; store and watch errors&amp;lt;br /&amp;gt;''Note: Compare the same task in ''tcsh''. ''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;# Write output to out.txt; store and watch errors&amp;lt;br /&amp;gt;''Note: Compare the same task in ''tcsh''. ''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;#: $ mycmd 2&amp;gt;&amp;amp;1 &amp;gt; out.txt | tee err.txt&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#: $ mycmd 2&amp;gt;&amp;amp;1 &amp;gt; out.txt | tee err.txt&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;#:: &amp;lt;span style=color:blue &amp;gt;stderr stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#:: &amp;lt;span style=color:blue &amp;gt;stderr stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;# Write messages to err.txt; write output to out.txt and copy output to terminal&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;# Write messages to err.txt; write output to out.txt and copy output to terminal&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;#: $ mycmd 2&amp;gt; err.txt | tee out.txt&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#: $ mycmd 2&amp;gt; err.txt | tee out.txt&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;#:: &amp;lt;span style=color:green&amp;gt;stdout stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#:: &amp;lt;span style=color:green&amp;gt;stdout stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;# Assign a variable from stored.txt&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;# Assign a variable from stored.txt&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;#: $ &amp;lt;stored.txt read var; mycmd $var &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#: $ &amp;lt;stored.txt read var; mycmd $var &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;#:: &amp;lt;span style=color:blue&amp;gt;stderr stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#:: &amp;lt;span style=color:blue&amp;gt;stderr stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;#:: &amp;lt;span style=color:green&amp;gt;stdout stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#:: &amp;lt;span style=color:green&amp;gt;stdout stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;# Assign first three lines of stored.txt to three different variables&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;# Assign first three lines of stored.txt to three different variables&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;#: $ exec 3&amp;lt;&amp;amp;0; exec &amp;lt;stored.txt; read v1; read v2; read v3; exec 0&amp;lt;&amp;amp;3 3&amp;lt;&amp;amp;-; echo $v1 $v2 $v3&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#: $ exec 3&amp;lt;&amp;amp;0; exec &amp;lt;stored.txt; read v1; read v2; read v3; exec 0&amp;lt;&amp;amp;3 3&amp;lt;&amp;amp;-; echo $v1 $v2 $v3&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;#:: &amp;lt;span style=color:blue&amp;gt;stderr stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#:: &amp;lt;span style=color:blue&amp;gt;stderr stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;#:: &amp;lt;span style=color:green&amp;gt;stdout stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#:: &amp;lt;span style=color:green&amp;gt;stdout stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;# Use all unique lines in stored.txt as an argument variable for ''mycmd'', appending to result.txt&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;# Use all unique lines in stored.txt as an argument variable for ''mycmd'', appending to result.txt&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;#: $ exec 3&amp;lt;&amp;amp;0; exec &amp;lt;stored.txt; sort | uniq | while read line; do mycmd $line &amp;gt;&amp;gt; result.txt ; done; exec 0&amp;lt;&amp;amp;3 3&amp;lt;&amp;amp;-;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#: $ exec 3&amp;lt;&amp;amp;0; exec &amp;lt;stored.txt; sort | uniq | while read line; do mycmd $line &amp;gt;&amp;gt; result.txt ; done; exec 0&amp;lt;&amp;amp;3 3&amp;lt;&amp;amp;-;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;#:: &amp;lt;span style=color:blue&amp;gt;stderr stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;#:: &amp;lt;span style=color:blue&amp;gt;stderr stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;: ''Note:'' By default, redirection pointed right represents &amp;lt;code&amp;gt;stdout&amp;lt;/code&amp;gt;, so that these two commands are exactly equivalent:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;: ''Note:'' By default, redirection pointed right represents &amp;lt;code&amp;gt;stdout&amp;lt;/code&amp;gt;, so that these two commands are exactly equivalent:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;:: $ mycmd 1&amp;gt; out.txt&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;:: $ mycmd 1&amp;gt; out.txt&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;:: $ mycmd &amp;gt; out.txt&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;:: $ mycmd &amp;gt; out.txt&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;::: &amp;lt;span style=color:blue &amp;gt;stderr stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;::: &amp;lt;span style=color:blue &amp;gt;stderr stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;: ''Note:'' By default, redirection pointed left represents &amp;lt;code&amp;gt;stdin&amp;lt;/code&amp;gt;, so that these two commands are exactly equivalent:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;: ''Note:'' By default, redirection pointed left represents &amp;lt;code&amp;gt;stdin&amp;lt;/code&amp;gt;, so that these two commands are exactly equivalent:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;:: $ mycmd 0&amp;lt; in.txt&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;:: $ mycmd 0&amp;lt; in.txt&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;:: $ mycmd &amp;lt; in.txt&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;:: $ mycmd &amp;lt; in.txt&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;::: &amp;lt;span style=color:blue &amp;gt;stderr stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;::: &amp;lt;span style=color:blue &amp;gt;stderr stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;::: &amp;lt;span style=color:green &amp;gt;stdout stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;::: &amp;lt;span style=color:green &amp;gt;stdout stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;: ''Note:'' To close a file descriptor, say &amp;lt;code&amp;gt;n&amp;lt;&amp;amp;-&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;: ''Note:'' To close a file descriptor, say &amp;lt;code&amp;gt;n&amp;lt;&amp;amp;-&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;:: $ mycmd &amp;gt;out.txt 1&amp;lt;&amp;amp;-;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;:: $ mycmd &amp;gt;out.txt 1&amp;lt;&amp;amp;-;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;:: ''-sh: fails without messages''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;:: ''-sh: fails without messages''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;:: &amp;lt;span style=color:blue &amp;gt;-bash: mycmd: write error: Bad file descriptor&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;:: &amp;lt;span style=color:blue &amp;gt;-bash: mycmd: write error: Bad file descriptor&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;=== A little more about ''fd n'' in &amp;lt;code&amp;gt;sh&amp;lt;/code&amp;gt; ===&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;=== A little more about ''fd n'' in &amp;lt;code&amp;gt;sh&amp;lt;/code&amp;gt; ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key bsdwiki:diff:version:1.11a:oldid:6703:newid:6708 --&gt;
&lt;/table&gt;</summary>
		<author><name>Ninereasons</name></author>	</entry>

	<entry>
		<id>http://www.freebsdwiki.net/index.php?title=Redirection&amp;diff=6703&amp;oldid=prev</id>
		<title>Ninereasons: operand (noun) =&gt; operator(verb)</title>
		<link rel="alternate" type="text/html" href="http://www.freebsdwiki.net/index.php?title=Redirection&amp;diff=6703&amp;oldid=prev"/>
				<updated>2006-06-28T17:08:44Z</updated>
		
		<summary type="html">&lt;p&gt;operand (noun) =&amp;gt; operator(verb)&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 17:08, 28 June 2006&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Redirection''' is sending the output of a program to somewhere other than where it would otherwise go - for example you can '''redirect''' the output of an [[ls]] command to a text file for later processing or to the [[grep]] command for filtering.&amp;#160; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Common operands &lt;/del&gt;include: '''&amp;gt;''', '''&amp;gt;&amp;gt;''', '''&amp;lt;''', '''&amp;lt;&amp;lt;''', and the ever popular '''|'''.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Redirection''' is sending the output of a program to somewhere other than where it would otherwise go - for example you can '''redirect''' the output of an [[ls]] command to a text file for later processing or to the [[grep]] command for filtering.&amp;#160; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Shell redirection operators &lt;/ins&gt;include: '''&amp;gt;''', '''&amp;gt;&amp;gt;''', '''&amp;lt;''', '''&amp;lt;&amp;lt;''', and the ever popular '''|'''.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; &amp;gt;&amp;#160; sends output to a file (may include [[special files]] such as [[/dev/null]])&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; &amp;gt;&amp;#160; sends output to a file (may include [[special files]] such as [[/dev/null]])&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key bsdwiki:diff:version:1.11a:oldid:6702:newid:6703 --&gt;
&lt;/table&gt;</summary>
		<author><name>Ninereasons</name></author>	</entry>

	<entry>
		<id>http://www.freebsdwiki.net/index.php?title=Redirection&amp;diff=6702&amp;oldid=prev</id>
		<title>Ninereasons: /* A little more about ''fd n'' in &lt;code&gt;sh&lt;/code&gt; */  - perhaps even more clear</title>
		<link rel="alternate" type="text/html" href="http://www.freebsdwiki.net/index.php?title=Redirection&amp;diff=6702&amp;oldid=prev"/>
				<updated>2006-06-28T03:24:49Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;A little more about &amp;#039;&amp;#039;fd n&amp;#039;&amp;#039; in &amp;lt;code&amp;gt;sh&amp;lt;/code&amp;gt;: &lt;/span&gt;  - perhaps even more clear&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 03:24, 28 June 2006&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 124:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 124:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; samizdata# myprogram 1&amp;gt;&amp;amp;2 2&amp;gt;&amp;amp;1 | command &amp;gt; errors.txt&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; samizdata# myprogram 1&amp;gt;&amp;amp;2 2&amp;gt;&amp;amp;1 | command &amp;gt; errors.txt&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;because when you switched output to the messages file descriptor, it's done ''right away''.&amp;#160; When you tried to switch errors to output there's nothing left to pipe. It's exactly as though you had said &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;because when you switched output to the messages file descriptor, it's done ''right away''.&amp;#160; When you tried to switch errors to output there's nothing left to pipe. It's exactly as though you had said &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; samizdata# myprogram 1&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;2 &lt;/del&gt;| command &amp;gt; errors.txt&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; samizdata# myprogram 1&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;/dev/stderr &lt;/ins&gt;| command &amp;gt; errors.txt&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;''command'' receives no data, because it's all been sent to your screen.&amp;#160; ''errors.txt'' will be empty.&amp;#160; If you had tried it the other way, it's just as though you would have said:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;''command'' receives no data, because it's all been sent to your screen.&amp;#160; ''errors.txt'' will be empty.&amp;#160; If you had tried it the other way, it's just as though you would have said:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; samizdata# myprogram 2&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;1 &lt;/del&gt;| command &amp;gt; errors.txt&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; samizdata# myprogram 2&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;/dev/stdout &lt;/ins&gt;| command &amp;gt; errors.txt&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;In which case, errors and output are both piped to ''command'', which was not what you wanted.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;In which case, errors and output are both piped to ''command'', which was not what you wanted.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key bsdwiki:diff:version:1.11a:oldid:6701:newid:6702 --&gt;
&lt;/table&gt;</summary>
		<author><name>Ninereasons</name></author>	</entry>

	<entry>
		<id>http://www.freebsdwiki.net/index.php?title=Redirection&amp;diff=6701&amp;oldid=prev</id>
		<title>Ninereasons: /* Redirection in &lt;code&gt;sh&lt;/code&gt; compared to &lt;code&gt;tcsh&lt;/code&gt; */</title>
		<link rel="alternate" type="text/html" href="http://www.freebsdwiki.net/index.php?title=Redirection&amp;diff=6701&amp;oldid=prev"/>
				<updated>2006-06-28T03:17:13Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Redirection in &amp;lt;code&amp;gt;sh&amp;lt;/code&amp;gt; compared to &amp;lt;code&amp;gt;tcsh&amp;lt;/code&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 03:17, 28 June 2006&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 102:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 102:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*#:: &amp;lt;span style=color:blue&amp;gt;stderr stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*#:: &amp;lt;span style=color:blue&amp;gt;stderr stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*#:: &amp;lt;span style=color:green&amp;gt;stdout stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*#:: &amp;lt;span style=color:green&amp;gt;stdout stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*# Use all unique lines in stored.txt as variable &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;input&lt;/del&gt;, appending to result.txt&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*# Use all unique lines in stored.txt as &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;an argument &lt;/ins&gt;variable &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;for ''mycmd''&lt;/ins&gt;, appending to result.txt&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*#: $ exec 3&amp;lt;&amp;amp;0; exec &amp;lt;stored.txt; sort | uniq | while read line; do mycmd $line &amp;gt;&amp;gt; result.txt ; done; exec 0&amp;lt;&amp;amp;3 3&amp;lt;&amp;amp;-;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*#: $ exec 3&amp;lt;&amp;amp;0; exec &amp;lt;stored.txt; sort | uniq | while read line; do mycmd $line &amp;gt;&amp;gt; result.txt ; done; exec 0&amp;lt;&amp;amp;3 3&amp;lt;&amp;amp;-;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*#:: &amp;lt;span style=color:blue&amp;gt;stderr stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*#:: &amp;lt;span style=color:blue&amp;gt;stderr stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key bsdwiki:diff:version:1.11a:oldid:6700:newid:6701 --&gt;
&lt;/table&gt;</summary>
		<author><name>Ninereasons</name></author>	</entry>

	<entry>
		<id>http://www.freebsdwiki.net/index.php?title=Redirection&amp;diff=6700&amp;oldid=prev</id>
		<title>Ninereasons: consistent terminology</title>
		<link rel="alternate" type="text/html" href="http://www.freebsdwiki.net/index.php?title=Redirection&amp;diff=6700&amp;oldid=prev"/>
				<updated>2006-06-28T03:15:21Z</updated>
		
		<summary type="html">&lt;p&gt;consistent terminology&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 03:15, 28 June 2006&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 54:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 54:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*#:: &amp;lt;span style=color:blue &amp;gt;stderr stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*#:: &amp;lt;span style=color:blue &amp;gt;stderr stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*# Direct &amp;lt;code&amp;gt;stdout&amp;lt;/code&amp;gt;+&amp;lt;code&amp;gt;stderr&amp;lt;/code&amp;gt; to file&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*# Direct &amp;lt;code&amp;gt;stdout&amp;lt;/code&amp;gt;+&amp;lt;code&amp;gt;stderr&amp;lt;/code&amp;gt; to file&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*#: % &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;localcmd &lt;/del&gt;&amp;gt;&amp;amp; out.txt&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*#: % &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;mycmd &lt;/ins&gt;&amp;gt;&amp;amp; out.txt&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*# Sort lines of jumble.txt into sorted.txt&amp;lt;br /&amp;gt;''Note: the sequence in which redirection appears is not important.&amp;#160; All of the following are exactly equivalent.''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*# Sort lines of jumble.txt into sorted.txt&amp;lt;br /&amp;gt;''Note: the sequence in which redirection appears is not important.&amp;#160; All of the following are exactly equivalent.''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*#: % &amp;lt;jumble.txt sort &amp;gt;sorted.txt&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*#: % &amp;lt;jumble.txt sort &amp;gt;sorted.txt&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key bsdwiki:diff:version:1.11a:oldid:6699:newid:6700 --&gt;
&lt;/table&gt;</summary>
		<author><name>Ninereasons</name></author>	</entry>

	<entry>
		<id>http://www.freebsdwiki.net/index.php?title=Redirection&amp;diff=6699&amp;oldid=prev</id>
		<title>Ninereasons: /* A little more about ''fd n'' in &lt;code&gt;sh&lt;/code&gt; */  - clarify stream swapping example</title>
		<link rel="alternate" type="text/html" href="http://www.freebsdwiki.net/index.php?title=Redirection&amp;diff=6699&amp;oldid=prev"/>
				<updated>2006-06-28T02:41:52Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;A little more about &amp;#039;&amp;#039;fd n&amp;#039;&amp;#039; in &amp;lt;code&amp;gt;sh&amp;lt;/code&amp;gt;: &lt;/span&gt;  - clarify stream swapping example&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 02:41, 28 June 2006&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 121:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 121:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;=== A little more about ''fd n'' in &amp;lt;code&amp;gt;sh&amp;lt;/code&amp;gt; ===&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;=== A little more about ''fd n'' in &amp;lt;code&amp;gt;sh&amp;lt;/code&amp;gt; ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Let's say you want to send output to your screen and errors to &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;a file&lt;/del&gt;. You '''can't''' just do&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Let's say you want to send output to your screen and errors to &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;another command&lt;/ins&gt;. You '''can't''' just do&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; samizdata# myprogram 1&amp;gt;&amp;amp;2 2&amp;gt;&amp;amp;1 &amp;gt; errors.txt&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; samizdata# myprogram 1&amp;gt;&amp;amp;2 2&amp;gt;&amp;amp;1 &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;| command &lt;/ins&gt;&amp;gt; errors.txt&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;because when you &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;do &lt;/del&gt;the &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;first switch&lt;/del&gt;, it's done ''right away'' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;and when the second &lt;/del&gt;&amp;gt;&amp;amp; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;comes around&lt;/del&gt;, it's &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;getting &lt;/del&gt;the &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;switched data&lt;/del&gt;. This is where the other, normally unused, file descriptors 3-9 come in. You can use them as place-holders, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;such as&lt;/del&gt;:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;because when you &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;switched output to &lt;/ins&gt;the &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;messages file descriptor&lt;/ins&gt;, it's done ''right away''&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;.&amp;#160; When you tried to switch errors to output there's nothing left to pipe. It's exactly as though you had said &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; samizdata# myprogram 3&amp;gt;&amp;amp;2 2&amp;gt;&amp;amp;1 1&amp;gt;&amp;amp;3 | command&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt; samizdata# myprogram 1&lt;/ins&gt;&amp;gt;&amp;amp;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;2 | command &amp;gt; errors.txt&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;will make the output of &lt;/del&gt;''&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;myprogram&lt;/del&gt;'' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;do this: &lt;/del&gt;3 &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;point &lt;/del&gt;to the &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;same place as &lt;/del&gt;2, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;2 point &lt;/del&gt;to &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;1&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;and finally&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;1 point to 3 and then pipe all &lt;/del&gt;of &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;it &lt;/del&gt;to ''command''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''command'' receives no data&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;because &lt;/ins&gt;it's &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;all been sent to your screen.&amp;#160; ''errors.txt'' will be empty.&amp;#160; If you had tried it &lt;/ins&gt;the &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;other way, it's just as though you would have said:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt; samizdata# myprogram 2&amp;gt;&amp;amp;1 | command &amp;gt; errors&lt;/ins&gt;.&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;txt&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;In which case, errors and output are both piped to ''command'', which was not what you wanted.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt; &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;This is where the other, normally unused, file descriptors 3-9 come in. You can use them as place-holders, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;like this&lt;/ins&gt;:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; samizdata# myprogram 3&amp;gt;&amp;amp;2 2&amp;gt;&amp;amp;1 1&amp;gt;&amp;amp;3 | command &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;gt; errors.txt&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Let&lt;/ins&gt;'&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;s step through what this does.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;# &lt;/ins&gt;''&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;fd 3&lt;/ins&gt;'&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;' points to &amp;lt;code&amp;gt;stderr&amp;lt;/code&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;# ''fd 2'' points to &amp;lt;code&amp;gt;stdout&amp;lt;/code&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;# ''fd 1'' points to ''fd &lt;/ins&gt;3&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'' (which is connected &lt;/ins&gt;to &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;code&amp;gt;stderr&amp;lt;/code&amp;gt;)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;# ''|'' passes &lt;/ins&gt;the &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;open file descriptor connected to &amp;lt;code&amp;gt;stdout&amp;lt;/code&amp;gt; (''fd &lt;/ins&gt;2&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'') making it &amp;lt;code&amp;gt;stdin&amp;lt;/code&amp;gt; for ''command''&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;# ''&amp;gt;'' redirects the output of ''command'' to ''errors.txt''.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;So&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;what you'll see on your screen is the output of ''myprogram'' on &amp;lt;code&amp;gt;stderr&amp;lt;/code&amp;gt; (not passed &lt;/ins&gt;to &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''command'')&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;followed by errors (if any) from ''command''.&amp;#160; In short&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;what's been accomplished is, a swap &lt;/ins&gt;of &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;errors for output, from ''myprogram'' &lt;/ins&gt;to ''command''&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;, the output of which is redirected to ''errors.txt''.&amp;#160; There is no reliable way to do the same thing in &amp;lt;code&amp;gt;tcsh&amp;lt;/code&amp;gt;.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Also, see the [http://www.freebsd.org/cgi/man.cgi?query=mkfifo&amp;amp;apropos=0&amp;amp;sektion=1&amp;amp;manpath=FreeBSD+6.1-RELEASE&amp;amp;format=html man page] for [[mkfifo]], a utility for creating arbitrary file descriptor files.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Also, see the [http://www.freebsd.org/cgi/man.cgi?query=mkfifo&amp;amp;apropos=0&amp;amp;sektion=1&amp;amp;manpath=FreeBSD+6.1-RELEASE&amp;amp;format=html man page] for [[mkfifo]], a utility for creating arbitrary file descriptor files.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Category:FreeBSD Terminology]] [[Category:Common Tasks]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Category:FreeBSD Terminology]] [[Category:Common Tasks]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key bsdwiki:diff:version:1.11a:oldid:6698:newid:6699 --&gt;
&lt;/table&gt;</summary>
		<author><name>Ninereasons</name></author>	</entry>

	<entry>
		<id>http://www.freebsdwiki.net/index.php?title=Redirection&amp;diff=6698&amp;oldid=prev</id>
		<title>Ninereasons: filename incorrect</title>
		<link rel="alternate" type="text/html" href="http://www.freebsdwiki.net/index.php?title=Redirection&amp;diff=6698&amp;oldid=prev"/>
				<updated>2006-06-28T01:40:40Z</updated>
		
		<summary type="html">&lt;p&gt;filename incorrect&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 01:40, 28 June 2006&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 99:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 99:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*#:: &amp;lt;span style=color:green&amp;gt;stdout stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*#:: &amp;lt;span style=color:green&amp;gt;stdout stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*# Assign first three lines of stored.txt to three different variables&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*# Assign first three lines of stored.txt to three different variables&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*#: $ exec 3&amp;lt;&amp;amp;0; exec &amp;lt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;test&lt;/del&gt;; read v1; read v2; read v3; exec 0&amp;lt;&amp;amp;3 3&amp;lt;&amp;amp;-; echo $v1 $v2 $v3&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*#: $ exec 3&amp;lt;&amp;amp;0; exec &amp;lt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;stored.txt&lt;/ins&gt;; read v1; read v2; read v3; exec 0&amp;lt;&amp;amp;3 3&amp;lt;&amp;amp;-; echo $v1 $v2 $v3&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*#:: &amp;lt;span style=color:blue&amp;gt;stderr stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*#:: &amp;lt;span style=color:blue&amp;gt;stderr stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*#:: &amp;lt;span style=color:green&amp;gt;stdout stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*#:: &amp;lt;span style=color:green&amp;gt;stdout stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*# Use all unique lines in stored.txt as variable input, appending to result.txt&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*# Use all unique lines in stored.txt as variable input, appending to result.txt&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*#: $ exec 3&amp;lt;&amp;amp;0; exec &amp;lt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;test&lt;/del&gt;; sort | uniq | while read line; do mycmd $line &amp;gt;&amp;gt; result.txt ; done; exec 0&amp;lt;&amp;amp;3 3&amp;lt;&amp;amp;-;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*#: $ exec 3&amp;lt;&amp;amp;0; exec &amp;lt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;stored.txt&lt;/ins&gt;; sort | uniq | while read line; do mycmd $line &amp;gt;&amp;gt; result.txt ; done; exec 0&amp;lt;&amp;amp;3 3&amp;lt;&amp;amp;-;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*#:: &amp;lt;span style=color:blue&amp;gt;stderr stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*#:: &amp;lt;span style=color:blue&amp;gt;stderr stuff&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*: ''Note:'' By default, redirection pointed right represents &amp;lt;code&amp;gt;stdout&amp;lt;/code&amp;gt;, so that these two commands are exactly equivalent:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*: ''Note:'' By default, redirection pointed right represents &amp;lt;code&amp;gt;stdout&amp;lt;/code&amp;gt;, so that these two commands are exactly equivalent:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key bsdwiki:diff:version:1.11a:oldid:6697:newid:6698 --&gt;
&lt;/table&gt;</summary>
		<author><name>Ninereasons</name></author>	</entry>

	</feed>