Trace the loop body separately from later commands Read trace-loop.sh first. Make a row for each assigned tone value, then a separate row for the condition after done. The record below retains earlier output from Bash 5.2.21. Comparing your prediction with that record does not mean you have executed the script yourself. trace-loop.sh stdout observed with Bash 5.2.21: amber violet silver nonempty Three loop iterations; the conditional line is outside the loop. Separate question loop: for tone in red blue green white; do ...; done Assume no nested loop, break, return or exit. Count body runs only.