654
functions
(lemmy.ml)
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
First thing you want is
set -eandset -o pipefail. That should report the errors in human-parseable form.Second, to capture exit codes from each command/program, you have to run each of them in sequence yourself, connected by pipes that you create via
mkfifo— the same way as you would do it in any other programming environment. Bash's|pipes are just a convenient shorthand for this, so if you want full control, you have to ditch the convenience.