<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Shell Pipes by Example</title>
	<atom:link href="http://nixshell.wordpress.com/2007/07/22/shell-pipes-by-example/feed/" rel="self" type="application/rss+xml" />
	<link>http://nixshell.wordpress.com/2007/07/22/shell-pipes-by-example/</link>
	<description>UNIX / Linux Shell Hints and Tips&#160;&#160;&#160;&#160;&#160;&#160;(a http://steve-parker.org/sh/sh.shtml subproject)</description>
	<lastBuildDate>Sun, 31 Mar 2013 18:54:44 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Forseth</title>
		<link>http://nixshell.wordpress.com/2007/07/22/shell-pipes-by-example/#comment-5279</link>
		<dc:creator><![CDATA[Forseth]]></dc:creator>
		<pubDate>Mon, 14 Sep 2009 11:57:54 +0000</pubDate>
		<guid isPermaLink="false">http://nixshell.wordpress.com/2007/07/22/shell-pipes-by-example/#comment-5279</guid>
		<description><![CDATA[I usually don?t post in Blogs but your blog forced me to, amazing work.. beautiful ?]]></description>
		<content:encoded><![CDATA[<p>I usually don?t post in Blogs but your blog forced me to, amazing work.. beautiful ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Tremell</title>
		<link>http://nixshell.wordpress.com/2007/07/22/shell-pipes-by-example/#comment-5179</link>
		<dc:creator><![CDATA[Mike Tremell]]></dc:creator>
		<pubDate>Mon, 14 Apr 2008 05:32:04 +0000</pubDate>
		<guid isPermaLink="false">http://nixshell.wordpress.com/2007/07/22/shell-pipes-by-example/#comment-5179</guid>
		<description><![CDATA[Nice post,

One cool thing to note about pipes in bash is that you can extract the return codes from every command in the pipeline, as opposed to using $? which always just returns the last.

If you check out the PIPESTATUS environment variable, it creates a nice array of return codes, so you could do

command 1&#124;command 2&#124;command3

and then evaluate PIPESTATUS as an array and get all the separate error codes back - assuming command 2 failed

echo ${PIPESTATUS[@]}
0 1 0

It&#039;s pretty helpful and I&#039;ve only discovered it recently, even though I&#039;ve been working on *nix for over a decade.  Maybe I&#039;m just to used to doing things the old-fashioned way ;)

Best Wishes,

Mike]]></description>
		<content:encoded><![CDATA[<p>Nice post,</p>
<p>One cool thing to note about pipes in bash is that you can extract the return codes from every command in the pipeline, as opposed to using $? which always just returns the last.</p>
<p>If you check out the PIPESTATUS environment variable, it creates a nice array of return codes, so you could do</p>
<p>command 1|command 2|command3</p>
<p>and then evaluate PIPESTATUS as an array and get all the separate error codes back &#8211; assuming command 2 failed</p>
<p>echo ${PIPESTATUS[@]}<br />
0 1 0</p>
<p>It&#8217;s pretty helpful and I&#8217;ve only discovered it recently, even though I&#8217;ve been working on *nix for over a decade.  Maybe I&#8217;m just to used to doing things the old-fashioned way <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Best Wishes,</p>
<p>Mike</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Srijan</title>
		<link>http://nixshell.wordpress.com/2007/07/22/shell-pipes-by-example/#comment-2696</link>
		<dc:creator><![CDATA[Srijan]]></dc:creator>
		<pubDate>Sun, 19 Aug 2007 16:07:34 +0000</pubDate>
		<guid isPermaLink="false">http://nixshell.wordpress.com/2007/07/22/shell-pipes-by-example/#comment-2696</guid>
		<description><![CDATA[good one!
Just stuk  with a shell assignment...:(]]></description>
		<content:encoded><![CDATA[<p>good one!<br />
Just stuk  with a shell assignment&#8230;:(</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: unixshell</title>
		<link>http://nixshell.wordpress.com/2007/07/22/shell-pipes-by-example/#comment-2073</link>
		<dc:creator><![CDATA[unixshell]]></dc:creator>
		<pubDate>Mon, 23 Jul 2007 23:23:01 +0000</pubDate>
		<guid isPermaLink="false">http://nixshell.wordpress.com/2007/07/22/shell-pipes-by-example/#comment-2073</guid>
		<description><![CDATA[I don&#039;t speak Indonesian, but the code looks good!]]></description>
		<content:encoded><![CDATA[<p>I don&#8217;t speak Indonesian, but the code looks good!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: joolean</title>
		<link>http://nixshell.wordpress.com/2007/07/22/shell-pipes-by-example/#comment-2067</link>
		<dc:creator><![CDATA[joolean]]></dc:creator>
		<pubDate>Mon, 23 Jul 2007 02:59:57 +0000</pubDate>
		<guid isPermaLink="false">http://nixshell.wordpress.com/2007/07/22/shell-pipes-by-example/#comment-2067</guid>
		<description><![CDATA[nice tutorial. I&#039;ve wrote piping tutorial myself on Indonesian language on http://julian.web.id/2007-apr-25/pipa .]]></description>
		<content:encoded><![CDATA[<p>nice tutorial. I&#8217;ve wrote piping tutorial myself on Indonesian language on <a href="http://julian.web.id/2007-apr-25/pipa" rel="nofollow">http://julian.web.id/2007-apr-25/pipa</a> .</p>
]]></content:encoded>
	</item>
</channel>
</rss>
