Really old sh -- pipefail

Hal Murray halmurray at sonic.net
Wed Sep 9 22:13:00 UTC 2026


> I just tested in dash, which is a minimal sh that does not support
> pipefail. That code works as written and does not work without the (). 

Thanks.  What do you mean by "does not work"?

As I see it, there are 2 cases: either the sh supports pipefail or it 
doesn't.

If it does support pipefail then a simple "set -o pipefail" works as 
expected.
If it doesn't support pipefail, then that gets an error message and 
pipefail doesn't get turned on.  What does adding the () do?  It doesn't 
get pipefail turned on.

>From Christophe Migliorini's report, trying to set pipefail on an old dash 
seems to ignore the rest of the command line (stuff after a ;) but we can 
avoid that.


-- 
These are my opinions.  I hate spam.





More information about the devel mailing list