home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.questions
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!darwin.sura.net!spool.mu.edu!umn.edu!lynx!unmvax!cs.sandia.gov!jhgreen
- From: jhgreen@cs.sandia.gov (Jethro H. Greene)
- Subject: Standard AND piped input
- Message-ID: <1992Nov9.042122.18966@cs.sandia.gov>
- Followup-To: jhgreen@c.sandia.gov
- Originator: jhgreen@cs.sandia.gov
- Sender: jhgreen@c.sandia.gov
- Organization: Sandia National Laboratories, Albuquerque, NM
- Date: Mon, 9 Nov 92 04:21:22 GMT
- Lines: 27
-
- When one pipes to something, the the output of the first becomes the input
- of the second. What would you do if you wanted the output of the first to
- be only be the beginning of the input for the second. For example, lets
- say I wanted to put the contents of my current directory and my dogs name into
- a file
-
- $ ls | thing_that_I_am_looking_for > output_file
- bob is my dog
- ^D
- $ cat output_file
- file1
- file2
- bob is my dog
- $
-
- It seems that this might have something to do with `tee`, but I can't figure
- out how.
-
- Any help anyone could give me would be greatly apreciated.
-
- Thanks
-
- --------------------------- |\_/| --------------------------------------------
- | Jethro H. Greene (Jed) | \`0.0'/ | Massively Parallel Comp. Research Lab., |
- | jhgreen@cs.sandia.gov | =(_-_)= | Sandia National. Lab., Albuquerque, NM |
- --------------------------- U --------------------------------------------
-
-