Afficher les lignes contenant une expression régulière définie
RS# show any-command | include regular-expression
ex :
RS# show running-config | include interface
interface Ethernet0/1
interface Ethernet1/1
interface Ethernet2/1
interface Ethernet3/1
interface Vlan1
Afficher les lignes ne contenant pas une expression régulière définie
RS# show any-command | exclude regular-expression
ex :
RS# show running-config | exclude interface
[...]
!
description Link to SW1
!
description Link to R1
!
description Link to PC2
!
!
ip address 10.10.1.3 255.255.255.0
shutdown
!
[...]
RS# show running-config | exclude !
[...]
interface Loopback0
ip address 10.10.3.1 255.255.255.0
interface Ethernet0/0
description Link to SW2
ip address 10.10.1.1 255.255.255.0
duplex auto
speed auto
interface Ethernet1/0
no ip address
duplex auto
speed auto
shutdown
[...]
RS# show running-config | exclude ^!$
[...]
interface Loopback0
ip address 10.10.3.1 255.255.255.0
interface Ethernet0/0
description Link to SW2
ip address 10.10.1.1 255.255.255.0
duplex auto
speed auto
interface Ethernet1/0
no ip address
duplex auto
speed auto
shutdown
[...]