The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #7 (permalink)  
Old 06-01-2009
qneill qneill is offline
Registered User
  
 

Join Date: Jan 2008
Posts: 23
PIPESTATUS and autoconfigure

At the risk of sounding like a hermit (talking to myself), I recently examined some of the configure scripts and saw several patterns:
  1. There aren't many pipe commands after all, mostly simple sed calls
  2. The tricks played with redirection are for logging and/or extracting return values from simple commands used inside of subshells

So the PIPESTATUS appears to be unique in the ability to extract return values from simple pipe commands.

Quote:
Originally Posted by qneill View Post
But how does one do it in a shell that doesn't have PIPESTATUS? I know that autoconf (tool to install source on almost Unix that has lots of shell-independent logic in it) plays tricks with redirection and subshells to capture the return values from inner pipe commands....