On Thu, Mar 23, 2017 at 08:50:45AM -0700, Pádraig Brady wrote:
> I was bitten by this again when combined with set -e.
> I.E. this script doesn't finish:
> 
> #!/bin/bash
> set -o errexit
> set -o pipefail
> yes | head -n1
> echo finished
> 
> That makes the errexit and pipefail options decidedly less useful.

No.  It makes errexit less useful.  Errexit (a.k.a. set -e) is horrible,
and you should not be using it in any new shell scripts you write.
It exists solely for support of legacy scripts.

Reply via email to