How can I filter the exact interface in huawei switch?
you see when I use the include GigabitEthernet0/0/1
to filter, there will get
many GigabitEthernet0/0/1*
interfaces:
<Z178A>dis interface brief | include GigabitEthernet0/0/1
PHY: Physical
*down: administratively down
#down: LBDT down
(l): loopback
(s): spoofing
(b): BFD down
(e): ETHOAM down
(dl): DLDP down
(lb): LBDT block
InUti/OutUti: input utility/output utility
Interface PHY Protocol InUti OutUti inErrors outErrors
GigabitEthernet0/0/1 up up 0% 0.01% 0 0
GigabitEthernet0/0/10 up up 0.12% 0.13% 0 0
GigabitEthernet0/0/11 up up 0% 0.01% 0 0
GigabitEthernet0/0/12 up up 0% 0.01% 0 0
GigabitEthernet0/0/13 up up 0.17% 0.03% 0 0
GigabitEthernet0/0/14 up up 0% 0.01% 0 0
GigabitEthernet0/0/15 up up 0% 0.01% 0 0
GigabitEthernet0/0/16 up up 0% 0% 0 5281
GigabitEthernet0/0/17 down down 0% 0% 0 0
GigabitEthernet0/0/18 down down 0% 0% 0 0
GigabitEthernet0/0/19 down down 0% 0% 0 0
when I use the GigabitEthernet0/0/1\s
I can not filter the GigabitEthernet0/0/1
out.
<Z178A>dis interface brief | include GigabitEthernet0/0/1\s
PHY: Physical
*down: administratively down
#down: LBDT down
(l): loopback
(s): spoofing
(b): BFD down
(e): ETHOAM down
(dl): DLDP down
(lb): LBDT block
InUti/OutUti: input utility/output utility
Interface PHY Protocol InUti OutUti inErrors outErrors
<Z178A>
so, who can help me with this? I want to filter out the exact interface GigabitEthernet0/0/1
.
<Z178A>dis interface brief | ?
begin Begin with the line that matches
exclude Match the character strings excluding with the regular expression
include Match the character strings including with the regular expression
EDIT-01
I tried the display interface brief | i ^XGigabitEthernet0/0/1 +
but still not work.
[Z178A]display interface brief
PHY: Physical
*down: administratively down
#down: LBDT down
(l): loopback
(s): spoofing
(b): BFD down
(e): ETHOAM down
(dl): DLDP down
(lb): LBDT block
InUti/OutUti: input utility/output utility
Interface PHY Protocol InUti OutUti inErrors outErrors
Eth-Trunk1 up up 2.80% 2.60% 0 0
GigabitEthernet0/0/49 up up 2.92% 2.82% 0 0
GigabitEthernet0/0/50 up up 2.68% 2.38% 0 0
Eth-Trunk100 down down 0% 0% 0 0
GigabitEthernet0/0/1 up up 0% 0.04% 0 0
GigabitEthernet0/0/2 up up 0% 0% 0 0
GigabitEthernet0/0/3 up up 0% 0% 0 0
GigabitEthernet0/0/4 up up 0.01% 0.01% 0 0
GigabitEthernet0/0/5 up up 0% 0.02% 0 0
GigabitEthernet0/0/6 up up 0% 0% 0 0
GigabitEthernet0/0/7 up up 0% 0% 0 0
GigabitEthernet0/0/8 up up 0% 0.04% 0 0
GigabitEthernet0/0/9 up up 0% 0.04% 0 0
GigabitEthernet0/0/10 up up 0.08% 0.06% 0 0
GigabitEthernet0/0/11 up up 0% 0.01% 0 0
GigabitEthernet0/0/12 up up 0% 0% 0 0
GigabitEthernet0/0/13 up up 0.07% 0.02% 0 0
GigabitEthernet0/0/14 up up 0.08% 0.02% 0 0
GigabitEthernet0/0/15 up up 0% 0.04% 0 0
GigabitEthernet0/0/16 up up 0% 0% 0 5281
GigabitEthernet0/0/17 down down 0% 0% 0 0
GigabitEthernet0/0/18 down down 0% 0% 0 0
GigabitEthernet0/0/19 down down 0% 0% 0 0
GigabitEthernet0/0/20 down down 0% 0% 0 0
GigabitEthernet0/0/21 down down 0% 0% 0 0
GigabitEthernet0/0/22 down down 0% 0% 0 0
GigabitEthernet0/0/23 down down 0% 0% 0 0
GigabitEthernet0/0/24 down down 0% 0% 0 0
GigabitEthernet0/0/25 down down 0% 0% 0 0
GigabitEthernet0/0/26 down down 0% 0% 0 0
GigabitEthernet0/0/27 down down 0% 0% 0 0
GigabitEthernet0/0/28 down down 0% 0% 0 0
GigabitEthernet0/0/29 down down 0% 0% 0 0
GigabitEthernet0/0/30 down down 0% 0% 0 0
GigabitEthernet0/0/31 down down 0% 0% 0 0
GigabitEthernet0/0/32 down down 0% 0% 0 0
GigabitEthernet0/0/33 down down 0% 0% 0 0
GigabitEthernet0/0/34 down down 0% 0% 0 0
GigabitEthernet0/0/35 down down 0% 0% 0 0
GigabitEthernet0/0/36 down down 0% 0% 0 0
GigabitEthernet0/0/37 up up 0% 0% 0 0
GigabitEthernet0/0/38 up up 0% 0% 0 0
GigabitEthernet0/0/39 up up 0% 0% 0 0
GigabitEthernet0/0/40 up up 0% 0% 0 0
GigabitEthernet0/0/41 up up 0% 0% 0 0
GigabitEthernet0/0/42 up up 0% 0% 0 0
GigabitEthernet0/0/43 up up 4.94% 5.34% 0 0
GigabitEthernet0/0/44 up up 0% 0% 0 0
[Z178A]display interface brief | i ^XGigabitEthernet0/0/1 +
PHY: Physical
*down: administratively down
#down: LBDT down
(l): loopback
(s): spoofing
(b): BFD down
(e): ETHOAM down
(dl): DLDP down
(lb): LBDT block
InUti/OutUti: input utility/output utility
Interface PHY Protocol InUti OutUti inErrors outErrors
dis interface brief | include GigabitEthernet0/0/1$
.$
means the end of the line. It will work if Huawei fully supports regular expressions.dis interface brief | exclude 1[0-9]
ordis interface brief | include \w*0\/0\/1\b\s+
dis interface brief | exclude \/[2-9]|\/[0-9]{2}