unable to use autoexpect

2.9k Views Asked by At

I am using autoexpect for the first time. I am not sure what should be the parameters for using it. I executed autoexpect command and there were continuous messages "autoexpect started, file is script.exp". If I execute ssh nothing happens.

autoexpect started, file is script.exp
autoexpect started, file is script.exp
autoexpect started, file is script.exp
autoexpect started, file is script.exp

Could anyone please help me on this.

Thanks in advance.

2

There are 2 best solutions below

0
On

I had the same problem. I was using bash and had lot of initial configuration in bash. May be some of the the startup configuration bash shell was affecting autoexpect. I invoked tcsh and then invoked autoexpect. And autoexpect worked very well in tcsh as it did not have any startup configuration.

Invoke tcsh and try it again. It worked for me once I invoked tcsh

1
On

autoexpect will create an expect script based on your actions, which can be reused.

So that means, first time you'll have to perform all the actions manually. Next time you can use the generated file script.exp to repeat the same actions. You may modify script.exp to make it more generic.

To exit out of autoexpect, simply type exit when all your actions are done.

MBP:~ user$ ./autoexpect 
autoexpect started, file is script.exp
bash-3.2$ exit
exit
autoexpect done, file is script.exp
MBP:~ user$