Saturday, October 9, 2010

Get Help Based on a String in a Statement Name

In configuration mode, you can use the help command to display help based on a text string contained in a statement name. This command displays help for statements at the current hierarchy level and below.

help apropos string 

string is a text string about which you want to get help. This string is used to match statement names as well as the help strings that are displayed for the statements. If the string contains spaces, enclose it in quotation marks (" "). You also can specify a regular expression for the string, using standard UNIX-style regular expression syntax.
You can also display help based on a text string contained in a statement name using the help topic and help reference commands.
help topic string
help reference string

The help topic command displays usage guidelines for the statement, while the help reference command displays summary information about the statement.

Example: Get Help Based on a String Contained in a
Statement Name

Get help about statements that contain the string "traps":
[edit]
user@host# help apropos traps 
set interfaces 
    Enable SNMP notifications on state changes
set interfaces  unit 
    Enable SNMP notifications on state changes
set snmp trap-group
    Configure traps and notifications
set snmp trap-group  version  all
    Send SNMPv1 and SNMPv2 traps
set snmp trap-group  version  v1
    Send SNMPv1 traps
set snmp trap-group  version  v2
    Send SNMPv2 traps
set protocols mpls log-updown
    Send SNMP traps
set firewall filter  term  from source-port snmptrap
    SNMP traps
set firewall filter  term  from source-port-except snmptrap
    SNMP traps
set firewall filter  term  from destination-port snmptrap
    SNMP traps
set firewall filter  term  from destination-port-except snmptrap
    SNMP traps
set firewall filter  term  from port snmptrap
    SNMP traps
set firewall filter  term  from port-except snmptrap
    SNMP traps
[edit]
user@host# edit interfaces at-5/3/0
[edit interfaces at-5/3/0]
user@host# help apropos traps
set 
    Enable SNMP notifications on state changes
set  unit 
    Enable SNMP notifications on state changes

No comments: