grep
有没有办法使用, ...只返回第二或第三、第四段awk
?
我怎样才能得到这个lo
段落,我知道使用命令是可能的,ifconfig lo
但是如果使用其他命令。的输出ifconfig
是:
eth0 Link encap:Ethernet HWaddr 00:25:22:b2:8b:0d
inet addr:192.168.1.22 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::225:22ff:feb2:8b0d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:100979 errors:0 dropped:0 overruns:0 frame:0
TX packets:70753 errors:0 dropped:0 overruns:0 carrier:1
collisions:0 txqueuelen:1000
RX bytes:129240044 (129.2 MB) TX bytes:7355272 (7.3 MB)
Interrupt:29
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)