in reply to Perl expect : send command executing multiple times

The first callback is returning exp_continue. That creates a loop: expect matches the prompt, sends the command, the command is run on the remote machine, a new prompt appears, expects matches the prompt again, etc,

Replies are listed 'Best First'.
Re^2: Perl expect : send command executing multiple times
by ryalagikar (Novice) on Jul 03, 2015 at 08:52 UTC

    How to resolve this..? If i don't use exp_continue, then next command is not going to execute(only 'date' command will execute).

    Thanks in advance. .

      Just call expect several times.