<a href="http:&#x2F;&#x2F;git.annexia.org&#x2F;?p=miniexpect.git" rel="nofollow">http:&#x2F;&#x2F;git.annexia.org&#x2F;?p=miniexpect.git</a><p>It&#x27;s an &quot;expect&quot;-like library written in C (and more sane than the Tcl original).  It&#x27;s 3 files, because it has a header file and a manual page.<p>It&#x27;s just 390 lines of code because it&#x27;s implemented using some PCRE trickery.