Date: Sun, 12 Jan 2025 22:39:57 -0500 From: Greg Wooledge <g...@wooledge.org> Message-ID: <20250113033957.gc27...@wooledge.org>
| At the risk of going a bit off topic, may I ask *why* the shell does | that? Were there any files or data stream conventions in common use | in the 1970s that would have prompted that design decision? I can't answer that, I'm not even certain whether it was an original Bourne sh mechanism, or first done in some ksh version, but do remember in both of those, that the implementation target was the pdp-11, with (in many models) just 64KB total address space - the code and data had to be made to fit. Many of the more obscure edge case rules (including this) are quite likely not because anyone set out to produce this particular result, but because the code to do it the way it was done was slightly smaller, and the result was acceptable. kre