[plug] send keystrokes to console program on execution line

Jim Householder nofixed at westnet.com.au
Mon Aug 1 20:58:04 WST 2011


On 08/01/11 19:26, Shanon Loughton wrote:
> HI everyone
>
> Id like to run a simple terminal program and supply the keystrokes 
> needed to kick it along, all in one line. Specifically its GLmark 
> (http://sourceforge.net/projects/glmark/) (I know, out of date...)
> and it needs something like this wrt keystrokes after running from its 
> directory:
>
> $ ./glmark [enter]
> 400 [enter]
> 300 [enter]
> 16 [enter]
> 1 [enter]
>
> cheers
> Shanon
>
>
Check out "Here Documents".  They are not a single-line construct, but 
do allow input to be included:
$ some-command << delimiter-word
data line 1
data line 2
...
delimiter-word

This will cause lines up to but not including the delimiter to be read 
as stdin.
HTH
Jim




More information about the plug mailing list