[comp.unix.questions] ECHO characters to another terminal

861087p@aucs.uucp (A N D R E A S) (10/30/89)

          I need all the help i can get with a program that does the 
following :
      It echoes the characters or lines that a user is typing
in a terminal to another terminal via the mail or write command.
Let's say I run that program within csh and i type in my terminal the
command "finger", I want both the command and the output to be sent
to another terminal connected to the system, as well as appear in my 
terminal too.
I currently work on SunOS 4 on a SUN 4.
Any hint would be appreciated...

                                          Andreas


            
-- 
****************************************************************************
Andreas Pikoulas| UUCP :{uunet|watmath|utai|garfield}!cs.dal.ca!aucs!861087p
TOWER 410       | BITNET   : 861087p@Acadia
WOLFVILLE-NS    | INTERNET : 861087p@AcadiaU.CA

khenry@umaxc.weeg.uiowa.edu (Ken Henry,18 LC,335-5531,3546389) (10/31/89)

From article <1989Oct30.092438.23143@aucs.uucp>, by 861087p@aucs.uucp (A N D R E A S):
> 
>           I need all the help i can get with a program that does the 
> following :
>       It echoes the characters or lines that a user is typing
> in a terminal to another terminal via the mail or write command.
> Let's say I run that program within csh and i type in my terminal the
> command "finger", I want both the command and the output to be sent
> to another terminal connected to the system, as well as appear in my 
> terminal too.

Is this program  a shell script or a program written in C, or something
else?  It would be fairly easy with sockets if you are familiar with
programming them.  Otherwise you could execute a command that does
i/o redirection on the terminal you are going to. like:
  % finger > /dev/ttyXX      where XX is the terminal you are sending
to.  If you would like to see an example using BSD sockets I will
send it to you.
-Ken Henry
--
| Ken Henry          | Disclaimer:  "you are getting my opinion for free, so
| Weeg Comp Center   | INTERNET: khenry@umaxc.weeg.uiowa.edu | I always say
| University of Iowa | BITNET:   bptkenpb@uiamvs.bitnet      | that you get 
| Iowa City, IA 52242| Phone:    319-335-5531 or 319-335-5484| what you pay"