S
Swamy
I have written a perl/expect program to automate the interactive shell
program.
The shell program needs to be run in local directory. That's fine. I
have done the following..
$exp->expect(30,"-re", $prompt);
$exp->send("cd <dir path>");
$exp->expect(30,"-re", $prompt);
$exp->send("pwd\n");
$exp->expect(30,"-re", $prompt);
$exp->spawn("install.sh");
^^^^^^^^
or $exp->spawn("./install.sh);
If I do this, I get an error saying install.sh is not found and
further expect command complains unidentified variable error or
something..
If I do
$exp->spawn("<dir path>/install.sh"); it works, but
installation fails.
The installation script looks for certain files locally and I have to
run this script from its. current directory. Can anybody tell me how
to make spawn work?
thanks
Swamy
program.
The shell program needs to be run in local directory. That's fine. I
have done the following..
$exp->expect(30,"-re", $prompt);
$exp->send("cd <dir path>");
$exp->expect(30,"-re", $prompt);
$exp->send("pwd\n");
$exp->expect(30,"-re", $prompt);
$exp->spawn("install.sh");
^^^^^^^^
or $exp->spawn("./install.sh);
If I do this, I get an error saying install.sh is not found and
further expect command complains unidentified variable error or
something..
If I do
$exp->spawn("<dir path>/install.sh"); it works, but
installation fails.
The installation script looks for certain files locally and I have to
run this script from its. current directory. Can anybody tell me how
to make spawn work?
thanks
Swamy