for interfacefile in `ls /etc/sysconfig/network-scripts/ifcfg-eth*`
我的 shell 脚本中有以下 for 循环。现在
ls /etc/sysconfig/network-scripts/ifcfg-eth*
/etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth1
/etc/sysconfig/network-scripts/ifcfg-eth0.0 /etc/sysconfig/network-scripts/ifcfg-eth1:1
问题是我只想grep普通以太网......不像 这种类型的逗号ifcfg-eth0.0
以及ifcfg-eth1:1
DOT分隔的字符串。