-2
我得到了与元素的数组:如何用grep特定的字符串,并只显示特定的列
set interfaces ge-1/0/2 unit 108 family inet address 10.187.132.227/27 vrrp-group 8 virtual-address 10.187.132.225
set interfaces ge-1/0/2 unit 108 family inet address 10.187.132.227/27 vrrp-group 8 priority 200
set interfaces ge-1/0/2 unit 108 family inet address 10.187.132.227/27 vrrp-group 8 accept-data
set interfaces ge-1/0/2 unit 109 family inet address 10.187.133.3/27 vrrp-group 9 virtual-address 10.187.133.1
set interfaces ge-1/0/2 unit 109 family inet address 10.187.133.3/27 vrrp-group 9 priority 190
set interfaces ge-1/0/2 unit 109 family inet address 10.187.133.3/27 vrrp-group 9 accept-data
set interfaces ge-1/0/2 unit 110 family inet address 10.187.133.35/27 vrrp-group 10 virtual-address 10.187.133.33
set interfaces ge-1/0/2 unit 110 family inet address 10.187.133.35/27 vrrp-group 10 priority 200
set interfaces ge-1/0/2 unit 110 family inet address 10.187.133.35/27 vrrp-group 10 accept-data
set interfaces ge-1/0/2 unit 111 family inet address 10.187.133.67/27 vrrp-group 11 virtual-address 10.187.133.65
set interfaces ge-1/0/2 unit 111 family inet address 10.187.133.67/27 vrrp-group 11 priority 190
set interfaces ge-1/0/2 unit 111 family inet address 10.187.133.67/27 vrrp-group 11 accept-data
set interfaces ge-1/0/2 unit 112 family inet address 10.187.133.99/27 vrrp-group 12 virtual-address 10.187.133.97
我怎么用grep地址和VRRP组之间唯一的字符串?
这回答了[这里](http://stackoverflow.com/questions/20550612/perl-grep-with-on-array/20551373#20551373)。 – Kenosis