How to print error message to another terminal.

  • Follow


Hello~~~

I want use a terminal to display the error message which comes from
stderr.
  I find a solution is redirect the stderr to a FIFO special file and
use a loop to read it in another terminal.
But it's not convenient. :(

  I want to use "write" commend but I have no idea about how to
redirect stderr to it?

Could you kindly find a good solution for me.  Thank you~~~

0
Reply thinkreverse 11/15/2007 3:23:38 AM

On Nov 15, 11:23 am, thinkreverse <ferocioush...@gmail.com> wrote:
> Hello~~~
>
> I want use a terminal to display the error message which comes from
> stderr.
>   I find a solution is redirect the stderr to a FIFO special file and
> use a loop to read it in another terminal.
> But it's not convenient. :(
>
>   I want to use "write" commend but I have no idea about how to
> redirect stderr to it?
>
> Could you kindly find a good solution for me.  Thank you~~~

let's see if I understood correctly:

term1:

bash-2.03$ tty
/dev/pts/1078
bash-2.03$ cat nothing > /dev/pts/1099 2>&1

term2:

bash-2.03$ tty
/dev/pts/1099
bash-2.03$ cat: cannot open nothing



Hth,

jbt



0
Reply jbt 11/15/2007 3:42:02 AM


On Nov 15, 11:42 am, jbt <joseph.mailboxl...@gmail.com> wrote:
> On Nov 15, 11:23 am, thinkreverse <ferocioush...@gmail.com> wrote:
>
> > Hello~~~
>
> > I want use aterminalto display the error message which comes from
> > stderr.
> >   I find a solution is redirect the stderr to a FIFO special file and
> > use a loop to read it in anotherterminal.
> > But it's not convenient. :(
>
> >   I want to use "write" commend but I have no idea about how to
> > redirect stderr to it?
>
> > Could you kindly find a good solution for me.  Thank you~~~
>
> let's see if I understood correctly:
>
> term1:
>
> bash-2.03$ tty
> /dev/pts/1078
> bash-2.03$ cat nothing > /dev/pts/1099 2>&1
>
> term2:
>
> bash-2.03$ tty
> /dev/pts/1099
> bash-2.03$ cat: cannot open nothing
>
> Hth,
>
> jbt

Hello jbt.

Thank you :)
0
Reply thinkreverse 11/16/2007 6:23:25 AM

2 Replies
239 Views

(page loaded in 0.044 seconds)

Similiar Articles:













7/23/2012 8:11:08 AM


Reply: