I'm using set -o pipefail
in my scripts as usual. That works perfectly well and as documented for something like
curl ... | jq ... | psql ...
However, is there a way to determine which command along a pipeline actually failed the whole thing?
I'm looking into this for the sole purpose of more concise logging but couldn't find any documentation thereon.