【发布时间】:2015-06-30 03:36:36
【问题描述】:
我想将 wwan0 接口的 DNS / 网关检索到一个变量中。除了将路由命令的结果存储在选项卡中并使用此 ID 获取值之外,还有其他方法(更强大)吗?
root@sn :~# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 176.28.206.105 0.0.0.0 UG 0 0 0 eth0
176.24.196.164 * 255.255.255.224 U 0 0 0 wwan0
176.26.210.210 176.28.211.211 255.255.255.255 UGH 0 0 0 eth0
176.28.4.4 * 255.255.0.0 U 0 0 0 eth0
172.24.201.100 * 255.255.255.255 UH 0 0 0 eth0
【问题讨论】:
标签: linux bash shell dns routes