Hi Guys,
I'm writing a script to configure a NetGear switch through its telnet port. I know how to login, how to issue commands, but now I has a problem. The switch has a menu first after we login it, and then by sending different key shortcuts, we can enter different sub-menus, or get in the Command Line Interface.
Below is the sample of the main menu:
FSM726 Management Switch
Main Menu
a. System
b. Status
c. Set-up
d. Tools
e. Security
f. Advanced
Below is the sample of the Advanced menu:
FSM726 Management Switch
Advanced
a. Port Mirroring
b. Port Trunking
c. Virtual Cable Tester
d. Advanced Security
e. Advanced Tools
f. Traffic Managment
g. VLANS
h. Spanning Tree
i. MAC
j. Multimedia Support
k. SNMP
l. Command Line
Now what I want is that I want to get all the sub-menu's name of a certain main menu, for example, I want to get all the sub menu of Advanced menu, please help me figure out how to do it?
Note, this is not the same as the CLI style.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.