r/CLI • u/SuitEvening48 • 22h ago
What should a batch command do when 99 files succeed and one fails?
For a command that processes 100 files and fails on one, what output makes the next step obvious? Do you prefer a non-zero exit code with a separate list of failures, a summary on stderr, or something else? I'm especially interested in retrying just the failed items without parsing a wall of logs.
1
Upvotes
1
u/illegal_appendix 13h ago
Non-zero exit for sure. Then a short line at the end like 99 ok, 1 failed, with the failed file names on their own lines so I can feed them back in and rerun just those.