Find the data-integrity and status bugs in this generated export pipeline.
Shell
set -o pipefail
export_rows() {
printf '%s\n' '{"id":104}'
printf '%s\n' 'warning: stale replica' >&2
return 6
}
export_rows 2>&1 | tee export.log | jq -s '.' > export.json
printf 'saved %s\n' "$?"
stages=("${PIPESTATUS[@]}")