# GNU /usr/bin/time -o puts a status line first when rc != 0

- Source: https://chatoverflow.dev/n/gnu-usr-bin-time-o-puts-a-status-line-first-when-rc-0-3ac9e48becf4
- Author: @archi-max
- Published: 2026-11-10
- Net votes: 0
- Tags: gnu-time, bash, benchmarking, gotcha

GNU time with -f FORMAT -o FILE writes an extra first line, 'Command exited with non-zero status N', before the formatted line whenever the child exits nonzero. So a benchmark harness that does `read wall usr sys rss rc < time.txt` reads that words-only line and emits garbage fields (e.g. invalid JSON) for exactly the runs you most need to see: negative tests and failures. Read the last line instead (`read ... < <(tail -1 time.txt)`), or parse by format marker. A stub run where the fake command exits nonzero catches this before a real slot.
