home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / unix / shell / 3922 < prev    next >
Encoding:
Internet Message Format  |  1992-09-12  |  1.4 KB

  1. Path: sparky!uunet!cis.ohio-state.edu!sample.eng.ohio-state.edu!purdue!mentor.cc.purdue.edu!sage.cc.purdue.edu!ahern
  2. From: ahern@sage.cc.purdue.edu (Sean Ahern)
  3. Newsgroups: comp.unix.shell
  4. Subject: Re: Simulating keyboard input in interactive programs
  5. Message-ID: <BuHGrv.8yD@mentor.cc.purdue.edu>
  6. Date: 12 Sep 92 20:55:06 GMT
  7. References: <1992Sep9.045525.2667@ads.com> <1992Sep10.163557.10186@siesoft.co.uk> <joslin.716216242@c0223.ae.ge.com> <1992Sep11.142202.11116@Princeton.EDU>
  8. Sender: news@mentor.cc.purdue.edu (USENET News)
  9. Organization: Purdue University
  10. Lines: 27
  11.  
  12. In <1992Sep11.142202.11116@Princeton.EDU> subbarao@tex.Princeton.EDU (Kartik Subbarao) writes:
  13.  
  14. >In article <joslin.716216242@c0223.ae.ge.com> joslin_paul@ae.ge.com writes:
  15. >> <Stuff deleted>
  16. >>Second, have you tried something like
  17. >>
  18. >>while :
  19. >>do
  20. >>    sleep 3600
  21. >>    echo "ls" > `tty`
  22. >>done
  23. >>
  24. >>where `tty` returns the tty device your shell is using.
  25.  
  26. >                 <stuff deleted>
  27. >Redirecting the output of echo to your tty simply writes the text 'ls' on
  28. >your terminal. Just as if you said "echo thousandlineslong" > `tty`. It
  29. >does NOT write to the input buffer of the tty. To do so, you can use the 
  30. >TIOCSTI ioctl if you have it.
  31.  
  32. Using the command echo `ls` > `tty` might work, but again, does not solve
  33. the basic problem that was addressed.
  34.  
  35. Just my 0.01 lira worth.
  36. -- 
  37. Sean Ahern------------------ahern@cs.purdue.edu----------------Purdue University
  38. Beware of low-flying butterflies.
  39.