#!/bin/sh
-
#!/bin/sh
set -euo pipefail
thanks, @b0rk - I've been writing shell for 25+ years and wish I'd been doing this 25+ years ago.
-
Riley S. Faelanreplied to Scott Francis last edited by
@darkuncle Btw, there's perhaps an error, perhaps an oversimplification in the comic: the 'fail the whole pipeline' logic is, by default, the exit status of a pipeline command comes from the exit status of its final component. It's well documented and an old idea, although, in retrospect, perhaps not the best idea. Unix is full of such.
Copyright © 2024 NodeBB | Contributors