home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / unix / question / 13142 < prev    next >
Encoding:
Text File  |  1992-11-09  |  1.4 KB  |  40 lines

  1. Newsgroups: comp.unix.questions
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!darwin.sura.net!spool.mu.edu!umn.edu!lynx!unmvax!cs.sandia.gov!jhgreen
  3. From: jhgreen@cs.sandia.gov (Jethro H. Greene)
  4. Subject: Standard AND piped input
  5. Message-ID: <1992Nov9.042122.18966@cs.sandia.gov>
  6. Followup-To: jhgreen@c.sandia.gov
  7. Originator: jhgreen@cs.sandia.gov
  8. Sender: jhgreen@c.sandia.gov
  9. Organization: Sandia National Laboratories, Albuquerque, NM
  10. Date: Mon, 9 Nov 92 04:21:22 GMT
  11. Lines: 27
  12.  
  13. When one pipes to something, the the output of the first becomes the input
  14. of the second.  What would you do if you wanted the output of the first to
  15. be only be the beginning of the input for the second.  For example, lets
  16. say I wanted to put the contents of my current directory and my dogs name into
  17. a file
  18.  
  19.     $ ls | thing_that_I_am_looking_for > output_file
  20.         bob is my dog
  21.     ^D
  22.     $ cat output_file
  23.         file1
  24.     file2
  25.     bob is my dog
  26.     $
  27.  
  28. It seems that this might have something to do with `tee`, but I can't figure
  29. out how.
  30.  
  31. Any help anyone could give me would be greatly apreciated.
  32.  
  33. Thanks
  34.  
  35. --------------------------- |\_/| --------------------------------------------
  36. | Jethro H. Greene (Jed) | \`0.0'/ | Massively Parallel Comp. Research Lab., |
  37. | jhgreen@cs.sandia.gov  | =(_-_)= | Sandia National. Lab., Albuquerque, NM  |
  38. ---------------------------   U   --------------------------------------------
  39.  
  40.