home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


UNIX Power Tools

UNIX Power ToolsSearch this book
Previous: 13.11 tpipe-Redirecting stdout to More than One Place Chapter 13
Redirecting Input and Output
Next: 13.13 The "Filename" -
 

13.12 Writing to Multiple Terminals for Demonstrations

To show what one person is typing, and let people watch at other terminals:

  1. The person doing the demonstration starts an interactive shell with a command like:

    % csh -i |& tee /tmp/log
    
    
    $ csh -i 2>&1 | tee /tmp/log
    
    

    Use exit to leave the shell. To start a Bourne shell, type sh instead of csh .

  2. Everyone who wants to watch types:

    tail -f
     
    
tail -f /tmp/log
    
    

    and uses CTRL-c to kill tail-f when they're done.

There are a couple of gotchas:

  • The person who's doing the demonstration won't be able to use full-screen programs like vi that expect their outputs to go to a terminal (instead of a pipe).

  • Commands may echo onto the screen but not into the log file. If that happens, type csh  -iv to start the demonstrator's C shell or sh  -iv for a Bourne shell.

- JP


Previous: 13.11 tpipe-Redirecting stdout to More than One Place UNIX Power Tools Next: 13.13 The "Filename" -
13.11 tpipe-Redirecting stdout to More than One Place Book Index 13.13 The "Filename" -

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System