Ask your own question, for FREE!
Computer Science 7 Online
OpenStudy (anonymous):

In GNU/Linux (I'm using Arch), how do you make stdin and stdout go in one terminal, and stderr go exclusively in another terminal? I think this is a simple command but I dont know it :(

OpenStudy (anonymous):

Maybe using tee or pipe into /dev/tty. I am not able to test them right now, just some ideas.

OpenStudy (rsmith6559):

To redirect stderr (file descriptor 2), the syntax is: 2>/dev/null This trashes anything going to stderr. Like bmp alluding to, you may be able to redirect it to the target tty's device file.

OpenStudy (anonymous):

how do I know which tty file belongs to whatever xterm/rxvt window ?

OpenStudy (farmdawgnation):

So, the better way to do this is to probably direct them to two different files and then tail those files in a terminal. So when you execute your program you would write something like... $ ./program > std.out 2> std.err Then in one terminal... $ tail -f std.out And in another tail -f std.err

OpenStudy (farmdawgnation):

Er. Forgot the prompt in my second example, but you get the idea.

OpenStudy (farmdawgnation):

phillips13, I don't believe those links directly answer his question.

OpenStudy (anonymous):

Thanks guys!! your commands worked fine (although I tried less +F over tail so I can scroll up :-D)

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!