Saturday, February 21, 2026

Re: set -e (was Re: single user machine, one "user" now(?) has no password (I didn't do it). [edited for clarity]

On Sat, Feb 21, 2026 at 10:25:04AM -0700, Luke Call wrote:
> On 2026-02-21 11:47:40+0000, Crystal Kolipe <kolipe.c@exoticsilicon.com> wrote:
> > On Fri, Feb 20, 2026 at 07:28:46PM -0800, Samuel wrote:
> >
> > > #!/bin/ksh
> > >
> > > set -e
> >
> > Do not use 'set -e' here. Or anywhere. Not in this script nor in any other
> > new script that you write.
>
> I'm surprised. Why is that?

Because:

* It's more correct to do explicit error checking for each possible failure

* A lot of people get usage of set -e wrong

No comments:

Post a Comment