How can I split an output of a command to two terminals? one will get stdout and the other will get stderr. The best I could do is:
On first terminal:

bash
command args 2> errors

and on second terminal

tcsh
while 1
    cat errors
    sleep 1
end

This works ok but it prints the errors over and over again every time, is there any better way to redirect the errors to another terminal?

link|improve this question

59% accept rate
feedback

1 Answer

up vote 4 down vote accepted

I don't know if this is 100 % correct.

Do the same thing on the first terminal, and on the second terminal don't use a "while" at all. Use tail -f errors to tail the errors file.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.