duplicate output to multiple terminals
Tom Soukup ~
tom at ismdqa.intel.com
Sun Nov 12 05:59:33 AEST 1989
In article <4647 at cbnewsc.ATT.COM> psfales at cbnewsc.ATT.COM (Peter Fales) writes:
>In article <256 at telxon.UUCP>, dank at telxon.UUCP (Dan Kelley) writes:
>> I am looking for an idea to duplicate output on different terminals.
>The "teacher" executes the following command:
> cu XXXX | tee /tmp/tmpfile
>The "students" run
> tail -f /tmp/tmpfile
>I don't totally understand why this works, but it does. You can even
>see all the "teacher's" key strokes in real time.
This works because tail -f writes the contents of the file to the standard
output (the screen) and then waits. As additional characters are put into
the file, tail -f continues writing them to the screen. It will continue
waiting forever (I think) unless interupted. So the cu | tee copies
everything that the cu echos into tmpfile and the tail prints everything
that goes into tmpfile on thr students screen. Good idea, I wish I'd
thought of it :-).
>Peter Fales AT&T, Room 5B-420
Tom
________________________________________________________________________________
DISCLAMER: Intel doesn't agree with much of anything that I say.
UUCP: {amdcad,decwrl,hplabs,oliveb,pur-ee,qantel}!intelca!mipos3!ismdqa!tom
ARPA: tom%ismdqa.intel.com at relay.cs.net CSNET: tom at ismdqa.intel.com
More information about the Alt.sources
mailing list