我正在編寫腳本來打印ifconfig的ethtool詳細信息。如何削減ifconfig來單獨獲取eth *細節?
輸出樣本應該是從命令ifconfig是什麼樣子,
eth0
eth1
eth2
我一直在使用下面的命令嘗試,
[email protected]# ifconfig | cut -d ":" -f 1
但可能無法實現相同。
其實,我需要得到這些eth*
並傳遞
[email protected]# ethtool <arg1> where arg1=eth*
,得到的結果:-)可以請你幫我從命令ifconfig獲得收成。 ?
非常感謝:-)兩個工程.. – San