- 论坛徽章:
- 0
|
wlan service-template 2 clear
ssid celebrity
bind WLAN-ESS 2
client forwarding-mode local vlan 8
service-template enable
#
interface NULL0
#
interface Vlan-interface1
#
interface Vlan-interface3001
ip address 10.101.9.10 255.255.255.224
#
interface M-GigabitEthernet1/0/0
#
interface Ten-GigabitEthernet1/0/1
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 2 to 2800 3001 4092
#
interface WLAN-ESS1
#
interface WLAN-ESS2
port link-type hybrid
port hybrid vlan 1 8 untagged
port hybrid pvid vlan 8
#
wlan ap hz_dhgy_ap1 model WA1208E-GP-H20 id 42
priority level 7
serial-id 210235A0GNC111008567
radio 1
channel 11
service-template 1 vlan-id 117
radio enable
#
wlan ap hz_dhgy_ap10 model WA1208E-GP-H20 id 51
priority level 7
serial-id 210235A0GNC111008799
radio 1
channel 11
service-template 1 vlan-id 117
radio enable
#
有文件如上面,现在我想得到
hz_dhgy_ap1 WA1208E-GP-H20 210235A0GNC111008567
hz_dhgy_ap10 WA1208E-GP-H20 210235A0GNC111008799
我这样写为什么不行啊(想匹配wlan ap 到#之间的行 变成一行后换行打印所需要的字段,得不到想要的结果)这个错在什么地方请各位大侠指教
awk '/wlan\ ap/,/#/ {printf $0}{print ""}' filename | awk '{print $3,$5,$12}' |
|