Thanks for the reply. But there is a pipestatus array in bash isn't there? ls | foo echo ${PIPESTATUS[0]} see: http://aplawrence.com/Blog/B955.html I just couldn't get it to work from Ruby -- Posted via http://www.ruby-forum.com/.