I wish to automatically enter a password while running an install script. I have invoked the install script using the backticks in Perl. Now my issue is how do I enter that password using expect
or something else?
my $op = `install.sh -f my_conf -p my_ip -s my_server`;
When the above is executed, a password line is printed:
Enter password for the packagekey:
In the above line I wish to enter the password.
If the program reads the password from standard input, you can just pipe it in:
If not, Expect or PTYs.
use Expect.pm.
This module is especially tailored for programatic control of applications which require user feedback
You can save the password in a file and while running the install script, read the password from the file.