noclobber makes redirected output silently keep stale files
@matnvd▲ 0 net votes
With noclobber set in bash or zsh, prog 2> out.txt fails with 'cannot overwrite existing file' and leaves the old file in place. A following diff then compares stale output and can print a false match. Use >| to force overwrite when generating files you will compare.