<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
> <channel><title>Comments on: Using Bash To Output To Screen And File At The Same Time</title> <atom:link href="http://www.skorks.com/2009/09/using-bash-to-output-to-screen-and-file-at-the-same-time/feed/" rel="self" type="application/rss+xml" /><link>http://www.skorks.com/2009/09/using-bash-to-output-to-screen-and-file-at-the-same-time/</link> <description>For the betterment of the software craft...</description> <lastBuildDate>Mon, 21 Nov 2011 13:57:06 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.1.2</generator> <item><title>By: Gopinath</title><link>http://www.skorks.com/2009/09/using-bash-to-output-to-screen-and-file-at-the-same-time/comment-page-1/#comment-7077</link> <dc:creator>Gopinath</dc:creator> <pubDate>Tue, 05 Apr 2011 15:16:46 +0000</pubDate> <guid
isPermaLink="false">http://www.skorks.com/?p=1236#comment-7077</guid> <description>How do i transfer the temporary redirecting variable 3 to a another variable,and how does the &quot;&amp;-&quot; symbol helps me .
Regds
Gopinath</description> <content:encoded><![CDATA[<p>How do i transfer the temporary redirecting variable 3 to a another variable,and how does the &#8220;&amp;-&#8221; symbol helps me .</p><p>Regds<br
/> Gopinath</p> ]]></content:encoded> </item> <item><title>By: ten</title><link>http://www.skorks.com/2009/09/using-bash-to-output-to-screen-and-file-at-the-same-time/comment-page-1/#comment-6093</link> <dc:creator>ten</dc:creator> <pubDate>Mon, 26 Jul 2010 12:35:22 +0000</pubDate> <guid
isPermaLink="false">http://www.skorks.com/?p=1236#comment-6093</guid> <description>If you still want to see stdout on screen as well, use:
command ls -l file notfile 3&gt;&amp;2 2&gt;&amp;1 1&gt;&amp;3 3&gt;&amp;- &#124; tee blah.txt
See also:
http://codesnippets.joyent.com/posts/show/8769</description> <content:encoded><![CDATA[<p>If you still want to see stdout on screen as well, use:</p><p>command ls -l file notfile 3&gt;&amp;2 2&gt;&amp;1 1&gt;&amp;3 3&gt;&amp;- | tee blah.txt</p><p>See also:</p><p><a
href="http://codesnippets.joyent.com/posts/show/8769" rel="nofollow">http://codesnippets.joyent.com/posts/show/8769</a></p> ]]></content:encoded> </item> <item><title>By: Alan Skorkin</title><link>http://www.skorks.com/2009/09/using-bash-to-output-to-screen-and-file-at-the-same-time/comment-page-1/#comment-3445</link> <dc:creator>Alan Skorkin</dc:creator> <pubDate>Sun, 31 Jan 2010 01:38:09 +0000</pubDate> <guid
isPermaLink="false">http://www.skorks.com/?p=1236#comment-3445</guid> <description>You&#039;re right, good point and a great tip, doing what you suggest works just as well, thanks for sharing.</description> <content:encoded><![CDATA[<p>You&#8217;re right, good point and a great tip, doing what you suggest works just as well, thanks for sharing.</p> ]]></content:encoded> </item> <item><title>By: Jeremy Johnstone</title><link>http://www.skorks.com/2009/09/using-bash-to-output-to-screen-and-file-at-the-same-time/comment-page-1/#comment-3444</link> <dc:creator>Jeremy Johnstone</dc:creator> <pubDate>Sun, 31 Jan 2010 00:52:52 +0000</pubDate> <guid
isPermaLink="false">http://www.skorks.com/?p=1236#comment-3444</guid> <description>How come you don&#039;t just use:
2&gt;&amp;1 &gt;/dev/null
instead of pocketing stdout into a new descriptor (aka 3 above)?</description> <content:encoded><![CDATA[<p>How come you don&#8217;t just use:</p><p>2&gt;&amp;1 &gt;/dev/null</p><p>instead of pocketing stdout into a new descriptor (aka 3 above)?</p> ]]></content:encoded> </item> <item><title>By: Alan Skorkin</title><link>http://www.skorks.com/2009/09/using-bash-to-output-to-screen-and-file-at-the-same-time/comment-page-1/#comment-3413</link> <dc:creator>Alan Skorkin</dc:creator> <pubDate>Tue, 26 Jan 2010 01:39:40 +0000</pubDate> <guid
isPermaLink="false">http://www.skorks.com/?p=1236#comment-3413</guid> <description>Nothing wrong with details :)</description> <content:encoded><![CDATA[<p>Nothing wrong with details :)</p> ]]></content:encoded> </item> <item><title>By: Myles</title><link>http://www.skorks.com/2009/09/using-bash-to-output-to-screen-and-file-at-the-same-time/comment-page-1/#comment-3412</link> <dc:creator>Myles</dc:creator> <pubDate>Mon, 25 Jan 2010 16:35:05 +0000</pubDate> <guid
isPermaLink="false">http://www.skorks.com/?p=1236#comment-3412</guid> <description>Devil/details alert. tee is a GNU-coreutils program, not a feature of bash (also part of the GNU Project, but not specifically coreutils). So the upshot is that tee will work equivalently with all shells.</description> <content:encoded><![CDATA[<p>Devil/details alert. tee is a GNU-coreutils program, not a feature of bash (also part of the GNU Project, but not specifically coreutils). So the upshot is that tee will work equivalently with all shells.</p> ]]></content:encoded> </item> <item><title>By: Alan Skorkin</title><link>http://www.skorks.com/2009/09/using-bash-to-output-to-screen-and-file-at-the-same-time/comment-page-1/#comment-3385</link> <dc:creator>Alan Skorkin</dc:creator> <pubDate>Fri, 08 Jan 2010 10:42:33 +0000</pubDate> <guid
isPermaLink="false">http://www.skorks.com/?p=1236#comment-3385</guid> <description>Thanks mate, another good reason for me to get my act together and start posting again :).</description> <content:encoded><![CDATA[<p>Thanks mate, another good reason for me to get my act together and start posting again :).</p> ]]></content:encoded> </item> <item><title>By: Thomas Sutton</title><link>http://www.skorks.com/2009/09/using-bash-to-output-to-screen-and-file-at-the-same-time/comment-page-1/#comment-3381</link> <dc:creator>Thomas Sutton</dc:creator> <pubDate>Fri, 08 Jan 2010 08:17:29 +0000</pubDate> <guid
isPermaLink="false">http://www.skorks.com/?p=1236#comment-3381</guid> <description>Nice article! I&#039;m subscribing to your RSS feed.
Do note though that redirecting file descriptors as you&#039;ve described is specified in &lt;a href=&quot;http://www.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_07&quot; rel=&quot;nofollow&quot;&gt;section 2.7 of volume 3&lt;/a&gt; of the &lt;a href=&quot;http://www.opengroup.org/onlinepubs/9699919799/&quot; rel=&quot;nofollow&quot;&gt;POSIX:2008/IEEE Std 1003.1-2008&lt;/a&gt; standard. Anything that calls itself &lt;code&gt;/bin/sh&lt;/code&gt; -- often bash on GNU/Linux systems -- should definitely  do this!
Thanks.</description> <content:encoded><![CDATA[<p>Nice article! I&#8217;m subscribing to your RSS feed.</p><p>Do note though that redirecting file descriptors as you&#8217;ve described is specified in <a
href="http://www.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_07" rel="nofollow">section 2.7 of volume 3</a> of the <a
href="http://www.opengroup.org/onlinepubs/9699919799/" rel="nofollow">POSIX:2008/IEEE Std 1003.1-2008</a> standard. Anything that calls itself <code>/bin/sh</code> &#8212; often bash on GNU/Linux systems &#8212; should definitely  do this!</p><p>Thanks.</p> ]]></content:encoded> </item> <item><title>By: Tim White</title><link>http://www.skorks.com/2009/09/using-bash-to-output-to-screen-and-file-at-the-same-time/comment-page-1/#comment-3334</link> <dc:creator>Tim White</dc:creator> <pubDate>Sun, 15 Nov 2009 23:25:09 +0000</pubDate> <guid
isPermaLink="false">http://www.skorks.com/?p=1236#comment-3334</guid> <description>Nice technique for separating stdout and stderr. That may come in handy with a bash function library I wrote for displaying nicely formatted output messages:
&lt;a href=&quot;http://www.zulius.com/freebies/bash-beauty-output-for-bash-scripts/&quot; rel=&quot;nofollow&quot;&gt;http://www.zulius.com/freebies/bash-beauty-output-for-bash-scripts/&lt;/a&gt;</description> <content:encoded><![CDATA[<p>Nice technique for separating stdout and stderr. That may come in handy with a bash function library I wrote for displaying nicely formatted output messages:</p><p><a
href="http://www.zulius.com/freebies/bash-beauty-output-for-bash-scripts/" rel="nofollow">http://www.zulius.com/freebies/bash-beauty-output-for-bash-scripts/</a></p> ]]></content:encoded> </item> <item><title>By: Alan Skorkin</title><link>http://www.skorks.com/2009/09/using-bash-to-output-to-screen-and-file-at-the-same-time/comment-page-1/#comment-3139</link> <dc:creator>Alan Skorkin</dc:creator> <pubDate>Fri, 02 Oct 2009 02:38:46 +0000</pubDate> <guid
isPermaLink="false">http://www.skorks.com/?p=1236#comment-3139</guid> <description>Well, you&#039;re right tee will work on any *nix, however, there was more to the post than just noting the existence of tee. The rest was all about redirection and file descriptors, and these will not necessarily work the same with every shell on any *nix.
I am working with bash, and I try to write the post in such  a way that I know everything I say will work for sure, therefore I specify bash. Of course if the stuff in a post happens to work in a different shell or on a different OS that&#039;s just a bonus :).</description> <content:encoded><![CDATA[<p>Well, you&#8217;re right tee will work on any *nix, however, there was more to the post than just noting the existence of tee. The rest was all about redirection and file descriptors, and these will not necessarily work the same with every shell on any *nix.</p><p>I am working with bash, and I try to write the post in such  a way that I know everything I say will work for sure, therefore I specify bash. Of course if the stuff in a post happens to work in a different shell or on a different OS that&#8217;s just a bonus :).</p> ]]></content:encoded> </item> </channel> </rss>
