Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .