Question

Is there any way of writing pexpect like small program which can launch a process and pass the password to that process? I don't want to install and use pexpect python library but want to know the logic behind it so that using linux system apis I can build something similar.

Was it helpful?

Solution

You could just use "expect". It is very light weight and is made to do what youre describing.

OTHER TIPS

For very simple cases, empty is one option. It's a lightweight C program, and it can be used straight from a shell script and doesn't require Tcl.

For Debian/Ubuntu, the package is empty-expect.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top