3 ms·
When this is important, you can make it so that stdout and stderr are the same stream, via a variety of methods. With bash this is done with 2>&1, as in: comm
by jewel 13y ago
When this is important, you can make it so that stdout and stderr are the same stream, via a variety of methods. With bash this is done with 2>&1, as in:
command 2>&1
- bazzargh 13y agoWhile that makes them the same stream, it doesn't actually solve the problem. Many systems will write to stdout buffered, but stderr unbuffered, so that writes are visible when the program crashes. Redirecting streams at the shell level doesn't stop application level buffering ruining your day. Having said that, GP's request is pretty niche, it's only useful when the program uses stdout (not a gui, web etc) and is doing work that might write to stderr while it's writing to stdout (so no summary report generators, long running physics simulations etc)