Afficher toutes les lignes contenant snmp :

FortiGate# show | grep snmp
   set snmp-index 1
        set snmp-index 2
        set snmp-index 3
        set snmp-index 4
        set allowaccess ping https ssh snmp http fgfm
config system snmp sysinfo
config system snmp community
        set name "public"
    edit "snmp-trap"
        set service "snmp-trap"

Afficher les sections de config qui contiennent snmp :

FortiGate# show | grep -f snmp
config system interface
    edit "port1"
        set vdom "root"
        set vlanforward enable
        set type physical
        set snmp-index 1 <---
    next
    edit "port2"
        set vdom "root"
        set vlanforward enable
        set type physical
        set snmp-index 2 <---
    next
    edit "port3"
        set vdom "root"
        set vlanforward enable
        set type physical
        set snmp-index 3 <---
    next
    edit "port4"
        set vdom "root"
        set vlanforward enable
        set type physical
        set snmp-index 4 <---
    next