bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pipefail with SIGPIPE/EPIPE


From: Jay Freeman (saurik)
Subject: Re: pipefail with SIGPIPE/EPIPE
Date: Thu, 23 Mar 2017 19:27:19 +0000 (UTC)

> 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.

Wow. For those of us who don't know this, what should we be using instead? Is 
using a trap on ERR any better? Is your suggestion that || exit 1 be added to 
the end of every command?

(Potentially of mild interest is this thread on Hacker News from earlier today, 
where multiple people are suggesting the usage of "set -e" along with "set -u" 
and "set -o pipefile".)

https://news.ycombinator.com/item?id=13940322



reply via email to

[Prev in Thread] Current Thread [Next in Thread]