home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cis.ohio-state.edu!sample.eng.ohio-state.edu!purdue!mentor.cc.purdue.edu!sage.cc.purdue.edu!ahern
- From: ahern@sage.cc.purdue.edu (Sean Ahern)
- Newsgroups: comp.unix.shell
- Subject: Re: Simulating keyboard input in interactive programs
- Message-ID: <BuHGrv.8yD@mentor.cc.purdue.edu>
- Date: 12 Sep 92 20:55:06 GMT
- References: <1992Sep9.045525.2667@ads.com> <1992Sep10.163557.10186@siesoft.co.uk> <joslin.716216242@c0223.ae.ge.com> <1992Sep11.142202.11116@Princeton.EDU>
- Sender: news@mentor.cc.purdue.edu (USENET News)
- Organization: Purdue University
- Lines: 27
-
- In <1992Sep11.142202.11116@Princeton.EDU> subbarao@tex.Princeton.EDU (Kartik Subbarao) writes:
-
- >In article <joslin.716216242@c0223.ae.ge.com> joslin_paul@ae.ge.com writes:
- >> <Stuff deleted>
- >>Second, have you tried something like
- >>
- >>while :
- >>do
- >> sleep 3600
- >> echo "ls" > `tty`
- >>done
- >>
- >>where `tty` returns the tty device your shell is using.
-
- > <stuff deleted>
- >Redirecting the output of echo to your tty simply writes the text 'ls' on
- >your terminal. Just as if you said "echo thousandlineslong" > `tty`. It
- >does NOT write to the input buffer of the tty. To do so, you can use the
- >TIOCSTI ioctl if you have it.
-
- Using the command echo `ls` > `tty` might work, but again, does not solve
- the basic problem that was addressed.
-
- Just my 0.01 lira worth.
- --
- Sean Ahern------------------ahern@cs.purdue.edu----------------Purdue University
- Beware of low-flying butterflies.
-