2004-10-09 · in Ideas · 161 words

At the moment, Unix terminals display stdout and stderr output mixed together; if you run a program interactively, it's not obvious which output went to stdout and which to stderr. If you're trying to script a program, it's quite often necessary to know where a piece of output it going.

I'd like a modified terminal program (and, presumably, shell) that captured stderr and displayed it in a different colour. One possibility would be for shells to start child processes with stdout and stderr connected to different pipes, capture both sorts of output, and wrap stderr output in appropriate escape characters. Doing this without clobbering the stdout output might be difficult, though, and under some circumstances it would be useful to have stderr go to a different window (for instance, if you're piping the output of a program into less, then you don't want stderr overwriting the less display).

David King's spliterr almost does this -- it produces two-column rather than coloured output.