Perl script. Pl 2>&1 >errorTestnormal. Out | tee -a errorTestnormal.
Out > errorTest.out.
Perl script. Pl 2>&1 >errorTestnormal. Out | tee -a errorTestnormal.
Out > errorTest. Out Will do what you want. This is a bit messy, lets go through it step by step.
We say what used to go to STDERR will now go STDOUT We say what used to go to STDOUT will now go to errorTestnormal.out. So now, STDOUT gets printed to a file, and STDERR gets printed to STDOUT. We want put STDERR into 2 different files, which we can do with tee.
Tee appends the text it's given to a file, and also echoes to STDOUT. We use tee to append to errorTestnormal. Out, so it now contains all the STDOUT and STDERR output of script.pl.
Then, we write STDOUT of tee (which contains STDERR from script. Pl) into errorTest. Out After this, errorTestnormal.
Out has all the STDOUT output, and then all the STDERR output. ErrotTest. Out contains only the STDERR output.
1 You are a scholar and a gentleman. Fantastic answer, and many thanks :) – kevin948 Nov 14 at 16:58 2 There is no need to use fd 3. You can simply do: perl script.Pl 2>&1 >errorTestnormal.
Out | tee ... The first redirection associates fd 2 (stderr) with the pipe, and the second redirects stdout to the file. If you do: perl script.Pl > errorTestnormal. Out 2>&1, then both stderr and stdout go to the file.
– William Pursell Nov 14 at 18:24 Good catch, fixed that. – Jarek Nov 14 at 20:45.
I guess in case of the 2nd ">" you try to send the error output of errorTestnormal. Out (and not that of script. Pl) to errorTest.out.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.