tags:

views:

115

answers:

1

I have one program, which writes its output to stderr and it also runs a executable internally which writes to stdout. I want to redirect the output of both to the same file using redirection operator something like "./a.out 2> output.txt", but this redirects the stderr, How to specify stdout also here.

+2  A: 

Under Linux:

./a.out > output.txt 2>&1
Joril
avd
Paul Dixon