C语言怎么实现逐行读取指定字符串丫?
eth0Linkencap:EthernetHWaddr00:0C:29inetaddr:192.10.64.64Bcast:192.10.255.255Mask:255...
eth0 Link encap:Ethernet HWaddr 00:0C:29
inet addr:192.10.64.64 Bcast:192.10.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1213688 errors:0 dropped:0 overruns:0 frame:0
TX packets:410276 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
lo Link encap:Ethernet HWaddr 00:0C:29
inet addr:192.10.64.64 Bcast:192.10.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1213688 errors:0 dropped:0 overruns:0 frame:0
TX packets:410276 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
eth1 Link encap:Ethernet HWaddr 00:0C:29
inet addr:192.10.64.64 Bcast:192.10.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1213688 errors:0 dropped:0 overruns:0 frame:0
TX packets:410276 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
以上内容放在一个input.txt里面,怎么把eth0和eth1的RX packets:1213688 TX packets:410276字段输出到另外一个output.txt里面。。各位大仙帮帮忙丫! 展开
inet addr:192.10.64.64 Bcast:192.10.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1213688 errors:0 dropped:0 overruns:0 frame:0
TX packets:410276 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
lo Link encap:Ethernet HWaddr 00:0C:29
inet addr:192.10.64.64 Bcast:192.10.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1213688 errors:0 dropped:0 overruns:0 frame:0
TX packets:410276 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
eth1 Link encap:Ethernet HWaddr 00:0C:29
inet addr:192.10.64.64 Bcast:192.10.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1213688 errors:0 dropped:0 overruns:0 frame:0
TX packets:410276 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
以上内容放在一个input.txt里面,怎么把eth0和eth1的RX packets:1213688 TX packets:410276字段输出到另外一个output.txt里面。。各位大仙帮帮忙丫! 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询