[Nottingham] input to bash

Peter Chang Peter.Chang at nottingham.ac.uk
Thu Aug 19 15:04:13 BST 2004


On Thu, 19 Aug 2004, David Wolfson wrote:
[using expect(1)]

> yup, it looks like it might be. Found, installed and running, now to
> the man pages...

If your program always expects a fixed number of user inputs then you can
just use the inline redirection:

yourpgm $arg1 $arg2 <<EOF
$var1
$var2
EOF

Peter



This message has been scanned but we cannot guarantee that it and any
attachments are free from viruses or other damaging content: you are
advised to perform your own checks.  Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.




More information about the Nottingham mailing list