sed 非贪婪匹配

sed -n 's#/[^/]*$##g'p

原文地址:https://www.cnblogs.com/yaoyuanchun/p/15592653.html