Subject: | Perl SSH Expect send result varies from manual execution |
Date: | Fri, 13 Jan 2012 15:48:30 +0000 |
To: | <bug-Net-SSH-Expect [...] rt.cpan.org> |
From: | <kumar.rajesh [...] wipro.com> |
Hi,
Greetings,
I am having an issue in perl (SSH::Expect) where I need some help with the interactive menu selection (perl case attached). It works fine manually but fails with perl ssh expect. When executing manually i get the following:
|---------------------------------------------|
| 1. Create task |
| 2. Start task |
| 3. Pause task |
| 4. Delete task |
| 5. Query task |
| 6. Save message |
|---------------------------------------------|
| 7. Exit |
|---------------------------------------------|
Please enter the operation serial number. >1
Incorrect number. Please enter a correct one. >1
NO. NE name NE type name
1 TB2SEE HW_SEE
2 UKTB2SEE HW_SEE
3 TB2SLEE HW_SLEE
4 UKTB2SLEE HW_SLEE
***************Input Tips*************
a: To create a tracing task for an NE, enter the NE number.
b: To create a tracing task for multiple NEs, enter the NE numbers and separate every two of them with a plus sign (+). Example: 1+2.
c: To create a tracing task for all NEs, enter 0.
**************************************
Please enter the NE serial number. >
but when i run it from perl automated script i get the following:
DB<1>
main::(iTrace_start_stop.pl:50): $ssh->waitfor('Please\senter\sthe\soperation\sserial\snumber.\s*', 2) or die "prompt 'operation serial number' not found after 2 second";
DB<1>
main::(iTrace_start_stop.pl:51): $ssh->send("1");
DB<1>
main::(iTrace_start_stop.pl:54): print $ssh->peek(1);
DB<1>
Show quoted text
>
NO.NE nameNE type name
---- More (Enter to show More) ----
NO.NE nameNE type name
---- More (Enter to show More) ----
NO.NE nameNE type name
---- More (Enter to show More) ----
That is it only prints the first line of the table but not the whole content.
Somehow the table is not coming properly from the server and it is not taking any further input. Please let me know if you have faced such issues so that i can fix this based on the experience.
Thanks,
Rajesh Kumar Bathina
Please do not print this email unless it is absolutely necessary.
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
www.wipro.com
Message body is not shown because sender requested not to inline it.