Yet another question about Redirection of stdout and stderr
by Mike B. from LinuxQuestions.org on (#6GMV4)
I have a question about redirection of stdout and stderr.
When I execute a program (call it isomeprogi), it produces both normal output via stdout and error output via stderr.
If I want to keep that output in separate files, I do this:
someprog >normalfile 2>errorfile
If I want to combine the outputs into a single file, I do this:
someprog >togetherfile 2>&1
My question is:
What do I do if I want to generate all three output files (normalfile, errorfile, and togetherfile) in a single execution of someprog?
Iive tried all sorts of things, including using the pipe operator and the iteei command, with no luck.
When I execute a program (call it isomeprogi), it produces both normal output via stdout and error output via stderr.
If I want to keep that output in separate files, I do this:
someprog >normalfile 2>errorfile
If I want to combine the outputs into a single file, I do this:
someprog >togetherfile 2>&1
My question is:
What do I do if I want to generate all three output files (normalfile, errorfile, and togetherfile) in a single execution of someprog?
Iive tried all sorts of things, including using the pipe operator and the iteei command, with no luck.