home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / unix / question / 12937 < prev    next >
Encoding:
Internet Message Format  |  1992-11-05  |  1.1 KB

  1. Path: sparky!uunet!pipex!warwick!uknet!mcsun!chsun!Germany.EU.net!esf!helsinki!klaus
  2. From: klaus@helsinkiesf.de (Klaus Wicovsky)
  3. Newsgroups: comp.unix.questions
  4. Subject: How to handle data from stdin in a sh script
  5. Message-ID: <5725@esf.esf.de>
  6. Date: 5 Nov 92 11:23:17 GMT
  7. Sender: news@esf.esf.de
  8. Reply-To: klaus@helsinkiesf.de (Klaus Wicovsky)
  9. Organization: ESF Headquarters, Berlin, FRG
  10. Lines: 21
  11. Nntp-Posting-Host: helsinki
  12.  
  13.  
  14. Here is the problem: I would like to pipe data into a sh script and still be able to interact with the sh script (ask questions to the user). 
  15.  
  16. Whatever I do, I don't seem to be able to get rid of the "piped" data, i.e. I put something like:
  17.  
  18. echo -n "Please confirm:"
  19. read conf
  20.  
  21. and the input stream seems to answer all questions. 
  22.  
  23. Any ideas?
  24.  
  25.  
  26.  
  27. -- 
  28.    Klaus Wicovsky                                                   
  29.                                                                     
  30.    ESF Headquarters                    Tel : ++49+30-820 903 47      
  31.    Hohenzollerndamm 152                Fax : ++49+30-820 903 19      
  32.    1000 Berlin 33                      UUCP: klaus@esf.de        
  33.    Germany             
  34.