Hacker News new | ask | show | jobs
by nix0n 1524 days ago
There's a tool for this type of thing called Expect[0], written in TCL.

[0] https://core.tcl-lang.org/expect/index

1 comments

And for completeness, miniexpect which is a small C library implementing the same sort of thing: https://rwmj.wordpress.com/2014/04/25/miniexpect-a-small-exp...

  $ wc -l miniexpect.[ch]
  489 miniexpect.c
  110 miniexpect.h