home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / alt / sources / 3093 < prev    next >
Encoding:
Text File  |  1993-01-25  |  1.2 KB  |  34 lines

  1. Newsgroups: alt.sources
  2. Path: sparky!uunet!pipex!warwick!dcs.warwick.ac.uk!rince
  3. From: rince@dcs.warwick.ac.uk (James Bonfield)
  4. Subject: Re: mwrite - write multiple users on your host, script in csh
  5. Message-ID: <1993Jan25.100106.7766@dcs.warwick.ac.uk>
  6. Sender: news@dcs.warwick.ac.uk (Network News)
  7. Nntp-Posting-Host: stone
  8. Organization: Department of Computer Science, Warwick University, England
  9. References: <1993Jan24.224248.3491@ousrvr.oulu.fi>
  10. Date: Mon, 25 Jan 1993 10:01:06 GMT
  11. Lines: 21
  12.  
  13. In <1993Jan24.224248.3491@ousrvr.oulu.fi> yaz@phoenix.oulu.fi writes:
  14.  
  15. > #!/bin/csh
  16. > # mwrite was written by yaz@phoenix.oulu.fi (Tuomas K Kaikkonen)
  17. > #
  18. > # Usage: mwrite username(s)
  19. > # Use Ctrl-D (EOF) to mark the end of the message.
  20. > # 
  21. > # Usage2 example: cat file | mwrite username(s)
  22.  
  23. If you're using rc there's a lovely way to do this :
  24.  
  25. {cat | tee >{write user1} >{write user2} >{write user3} } > /dev/null
  26.  
  27. Why can't other shells handle such lovely multiple tee style expressions?
  28.  
  29.     James
  30. -- 
  31. James Bonfield (jkb@mrc-lmba.cam.ac.uk / rince@dcs.warwick.ac.uk)
  32. Medical Research Council Laboratory of Molecular Biology, Hills Road,
  33. Cambridge, CB2 2QH, England. Tel: 0223 402499   Fax: 0223 412282
  34.