Lets start with some general information to make the problem understandable:
A Unix process is like a (y-shaped) water hose: you fill something in (via <stdin>) and something comes out (via <stdout>) the one way and something else the other way (<stderr>). You can - to continue the analogy - put a bucket under each of the outlets, even the same bucket under several outlets, but they will still remain different outlets of data.
By default, when a process is born, its 3 default I/O-channels are directed to:
stdin: keyboard
stdout: display
stderr: display
As <stdout> and <stderr> are both pointing to display, why is it that
process_1 | process_2
picks up the output from <stdout> but not from <stderr>? The answer is that "|" is a special form of connector, not just another bucket like ">". "|" means: redirect <stdout> of process_1 to <stdin> of process_2.
Now there is another redirection device, which is:
process_1 2>&1
This means: redirect output channel 2 (=<stderr>) to where output channel 1 (=<stdout>) points to right now. All redirections are read and carried out from left to right.
Having understood this let us try to solve your problem:
script 2>&1
will redirect <stderr> to <stdout>, so the next "|" will catch <stderr> output now too. Closer!
script 2>&1 | tee -a /some/file
This will pick up everything coming out of <stderr> and <stdout> of script and display it as well as appending it to "/some/file". Closer again, but <stdout> should not be displayed, so we will have to direct it away before the pipe picks up its input:
script 2>&1 1>/some/file | tee -a /some/file
This finally does what we want: output to <stdout> is put into "/some/file", output to <stderr> is being displayed before being appended to /some/file" too.
The only uncertainty left is that i am not sure if the exact sequence of the messages will be preserved, especially if there is high load and many messages. You will have to try that. I'll be tankful if you could post a follow-up telling us this.
I hope this helps.
bakunin