At the risk of sounding like a hermit (talking to myself), I recently examined some of the configure scripts and saw several patterns:
- There aren't many pipe commands after all, mostly simple sed calls
- 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
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....
|