

Expect - brudgers
http://www.cotse.com/dlf/man/expect/description.htm

======
bbunix
Too heavy - if you're looking for expect-like functionality but much simpler -
look at empty (worst name in the world and impossible to search for - but
great code): [http://empty.sourceforge.net/](http://empty.sourceforge.net/)

~~~
bobbyi_settv
Another option is pexpect (expect in Python):

[https://pexpect.readthedocs.org/en/latest/](https://pexpect.readthedocs.org/en/latest/)

~~~
drrb
Ruby has a PTY module [1] with an expect method [2] that supports scripting
similar to expect. Examples here: [http://www.42klines.com/2010/08/14/what-to-
expect-from-the-r...](http://www.42klines.com/2010/08/14/what-to-expect-from-
the-ruby-expect-library.html) .

1\. [http://ruby-doc.org/stdlib-2.2.2/libdoc/pty/rdoc/PTY.html](http://ruby-
doc.org/stdlib-2.2.2/libdoc/pty/rdoc/PTY.html) 2\. [http://ruby-
doc.org/stdlib-2.1.0/libdoc/pty/rdoc/IO.html](http://ruby-
doc.org/stdlib-2.1.0/libdoc/pty/rdoc/IO.html)

------
jacobparker
Here's a simple related tool I made:
[https://github.com/j3parker/hijack](https://github.com/j3parker/hijack)

It's like tee but also creates a named pipe that gets hooked into stdin.

It's pretty gross but in a pinch its been useful.

------
jcr
I looked right at the domain name, cotse.com, said to myself, "that sure looks
real familiar..." and still failed to remember it. On a second look, it
finally dawned on me, "Church of the Swimming Elephant!"

~~~
msh
I spend quite some time on their irc around 2000. Good times.

------
tonteldoos
Pain in the behind as it is to use and debug, if implemented correctly, it
actually works quite well. Used this back in the day for some automated
distributed build and test, and performed admirably. Ahh, memories...

