我有一個這樣的輸出:如何使用perl拆分ND neigbour結果的結果?
IPv6 Address Age Link-layer Addr State Circuit
2001::1 0 00:30:88:13:28:b9 intf 1/1 vlan-id 100
2001::2 62 00:00:00:00:00:00 incmp 1/1 vlan-id 100
2002::1 0 00:30:88:13:28:b9 intf 1/1 vlan-id 101
2002::2 63 00:00:00:00:00:00 incmp 1/1 vlan-id 101
fe80::201:4ff:fe00:0 14 00:00:00:00:00:00 incmp 1/1 vlan-id 100
fe80::230:88ff:fe13:28b9 0 00:30:88:13:28:b9 intf 1/1 vlan-id 100
fe80::201:5ff:fe01:0 60 00:00:00:00:00:00 incmp 1/1 vlan-id 101
fe80::230:88ff:fe13:28b9 0 00:30:88:13:28:b9 intf 1/1 vlan-id 101
在這裏,我希望存儲單獨的年齡列的值。如何在這裏使用split或grep命令?
歡迎SO,你嘗試過這麼遠嗎?我假設你已經加載了這個文件 - 你可以添加你至少擁有的Perl嗎?你能否澄清一下這是一種固定寬度的格式 - 它可以使事情變得非常簡單:-) –