如何使用管道解析命令的输出
原文:How to use pipe to parse output of a command
原文:How to use pipe to parse output of a command
我想处理一个进程的输出, 比如 ifconfig 。 正如大家所知, ifconfig 的输出是包含 inet addr: 掩码: 等等 的线条列表 。 但我想单独从 Ip 提取 IP [ 从 inet addr 中提取 :...