From: "ara.t.howard" Date: 2008-05-08T00:45:10+09:00 Subject: Re: Getting pipe return codes from SYSTEM command On May 7, 2008, at 9:33 AM, Russell Quinn wrote: > how can I still get the return code of ls? you cannot. this is a bash limitation. if you need to do that use something like: stdout = IO.popen('ls'){|pipe| pipe.read} p $?.exitstatus stdout = IO.popen('bzip2 -c', 'r+'){|pipe| pipe.write stdout; pipe.close_write; pipe.read} p $?.exitstatus a @ http://codeforpeople.com/ -- we can deny everything, except that we have the possibility of being better. simply reflect on that. h.h. the 14th dalai lama