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

  1. Newsgroups: comp.unix.questions
  2. Path: sparky!uunet!elroy.jpl.nasa.gov!orchard.la.locus.com!prodnet.la.locus.com!locus.com!mjl
  3. From: mjl@bos.locus.com (Mike Leibensperger)
  4. Subject: Re: How to handle data from stdin in a sh script
  5. In-Reply-To: klaus@helsinkiesf.de's message of 5 Nov 92 11: 23:17 GMT
  6. Message-ID: <MJL.92Nov5161719@rigel.bos.locus.com>
  7. Sender: news@locus.com (Netnews)
  8. Organization: Locus Computing Corp., Boston Massachusetts USA.
  9. References: <5725@esf.esf.de>
  10. Date: Thu, 5 Nov 1992 21:17:19 GMT
  11. Lines: 20
  12.  
  13.  
  14. In article <5725@esf.esf.de> klaus@helsinkiesf.de (Klaus Wicovsky) writes:
  15.  
  16.    Here is the problem: I would like to pipe data into a sh script and
  17.    still be able to interact with the sh script (ask questions to the user).  
  18.  
  19. Use /dev/tty when interacting with the terminal:
  20.  
  21.     echo -n "Please confirm:" > /dev/tty
  22.     read conf < /dev/tty
  23.  
  24. Have a blast, viel Glueck, usw...
  25.  
  26.     mjl
  27. --
  28. Michael J. Leibensperger      "Rats and roaches live by competition under the
  29. Locus Computing/Boston         laws of supply and demand; it is the privilege
  30. 25 Mall Road; Burlington MA         of human beings to live under the laws of
  31. 01803 (617)229-4980 mjl@locus.com       justice and mercy."  -- Wendell Berry
  32. Member of the League for Programming Freedom --- write league@prep.ai.mit.edu
  33.