Subject: Re: Getting pipe return codes from SYSTEM command
From: Albert Schlef <albertschlef gmail.com>
Date: Thu, 8 May 2008 01:16:35 +0900
References: 300939300940300941
In-reply-to: 300941
Russell Quinn wrote:
> ls | foo
>
> echo ${PIPESTATUS[0]}
>
> I just couldn't get it to work from Ruby
try 'ls | echo; exit ${PIPESTATUS[0]}'
--
Posted via http://www.ruby-forum.com/.