标签:conf gre scripts rip name 系统 lin har style
效果等于~]#dirname /etc/sysconfig/network-scripts/ifcfg-ens33
echo "/etc/sysconfig/network-scripts/ifcfg-ens33"|grep -o -E "(^/([^/]+/)*[^[:space:]])|^/"|grep -o -E "^/([^/]+/)*"|grep -o -E "(/[^/]+)+|^/"
效果等于:~]#basename /etc/sysconfig/network-scripts/ifcfg-ens33
echo "/etc/sysconfig/network-scripts/ifcfg-ens33"|grep -o -E "[^/]+/?$"|grep -o -E "^[^/]+"
标签:conf gre scripts rip name 系统 lin har style
原文地址:https://www.cnblogs.com/hx1998/p/11627470.html