Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer 1

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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