5

Writing both output and error stream to the same file

view full story
linux-howto

http://unix.stackexchange.com – In Unix/Linux you can use pipes to write output and error streams to a file. One can even write them to the same file. Is there a way to write both to the file but maintaining the order. This statement: swipl -s jobshop.chr < CHRInput > output 2> output indeed produces a file called "output" with both the output and error stream (normally this was the console interaction with the user). But the output stream is written before the error stream (while working with an interactive console will produce error and output streams interleaved). (HowTos)