Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Screen Scraping from Juniper Switch using Expect.pm - Multiple Commands

by RonW (Parson)
on May 05, 2015 at 22:09 UTC ( [id://1125774]=note: print w/replies, xml ) Need Help??


in reply to Screen Scraping from Juniper Switch using Expect.pm - Multiple Commands

I need to look for a CLI prompt. But how do I tell the difference between the initial login vs. subsequent prompts (after the successful completion of a CLI command)?

Presumably, you have used telnet/ssh to manually log in to the switch to run commands. Is the CLI prompt really identical to the login prompt? What about text that precedes the prompts? Often there is some kind of "welcome" text before the login prompt.

If there's really no difference in the prompts and no other text you can look for, then just issue the command and look for another prompt. Then assume it is a CLI prompt and issue the next command.

  • Comment on Re: Screen Scraping from Juniper Switch using Expect.pm - Multiple Commands

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1125774]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2024-04-23 06:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found