On Monday, September 1, 2025, Maria <mariaca...@proton.me> wrote:

> I don't understand why that behavior _should be_
> what happens.


I don't think that's set in stone.

If at all possible, I would really like bash to at least not exit early,
> similarly to ksh and zsh.
>

But I don't like how zsh handles it:

echo: write error: broken pipe
zsh: write error: broken pipe
echo: write error: broken pipe
zsh: write error: broken pipe
echo: write error: broken pipe
zsh: write error: broken pipe
echo: write error: broken pipe
zsh: write error: broken pipe
echo: write error: broken pipe
zsh: write error: broken pipe

If a change is really necessary, bash should print "Broken pipe" and abort
the outermost compound command.


-- 
Oğuz

Reply via email to