<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-6111725723134762877.post5897912916006858447..comments</id><updated>2009-01-18T07:13:47.438-08:00</updated><category term='l'/><title type='text'>Comments on XMLSH: which pipeline is "this" shell ?</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.xmlsh.org/feeds/5897912916006858447/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6111725723134762877/5897912916006858447/comments/default'/><link rel='alternate' type='text/html' href='http://blog.xmlsh.org/2009/01/while-pipeline-is-this-shell.html'/><author><name>David Lee</name><uri>http://www.blogger.com/profile/06155161084044858311</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://3.bp.blogspot.com/_1reNRy3c_Zw/SXHf5K9flYI/AAAAAAAAACo/GvUAPQNGtGs/S220/Copy+of+11_1_2008_005_sized.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>1</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6111725723134762877.post-6113579704555693360</id><published>2009-01-18T07:13:00.000-08:00</published><updated>2009-01-18T07:13:00.000-08:00</updated><title type='text'>I have changed the implementation to run the last ...</title><content type='html'>I have changed the implementation to run the last command in a pipeline to run in the current shell.   This reference&lt;BR/&gt;http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_10&lt;BR/&gt;&lt;BR/&gt;Section 2.9.2 has a hint that this is the expected behaviour but it doesnt totally spell it out.  It covers the exit status of the last command:&lt;BR/&gt;&lt;BR/&gt;"If the reserved word ! does not precede the pipeline, the exit status shall be the exit status of the last command specified in the pipeline. Otherwise, the exit status shall be the logical NOT of the exit status of the last command. That is, if the last command returns zero, the exit status shall be 1; if the last command returns greater than zero, the exit status shall be zero."&lt;BR/&gt;&lt;BR/&gt;This syntax now works&lt;BR/&gt;&lt;BR/&gt;$ echo foo | read a&lt;BR/&gt;$ echo $a&lt;BR/&gt;foo</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6111725723134762877/5897912916006858447/comments/default/6113579704555693360'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6111725723134762877/5897912916006858447/comments/default/6113579704555693360'/><link rel='alternate' type='text/html' href='http://blog.xmlsh.org/2009/01/while-pipeline-is-this-shell.html?showComment=1232291580000#c6113579704555693360' title=''/><author><name>David Lee</name><uri>http://www.blogger.com/profile/06155161084044858311</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='05869645730951764735'/><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://3.bp.blogspot.com/_1reNRy3c_Zw/SXHf5K9flYI/AAAAAAAAACo/GvUAPQNGtGs/S220/Copy+of+11_1_2008_005_sized.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.xmlsh.org/2009/01/while-pipeline-is-this-shell.html' ref='tag:blogger.com,1999:blog-6111725723134762877.post-5897912916006858447' source='http://www.blogger.com/feeds/6111725723134762877/posts/default/5897912916006858447' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-11814'/></entry></feed>
