我运行代码给了我以下示例数据
md5deep find * | awk '{ print $1 }'
输出样本
/Users/math/Documents/Articles/Number theory: Is a directory
258fe6853b1bfb2d07f512ff6bec52b1
/Users/math/Documents/Articles/Probability and statistics: Is a directory
4811bfb2ad04b9f4318049c01ebb52ef
8aae4ac3694658cf90005dbdea37b4d5
258fe6853b1bfb2d07f512ff6bec52b1
我试图通过 SED过滤包含Is a directory的行未成功
md5deep find * | awk '{ print $1 }' | sed s/\/*//g
它的样本输出是
/Users/math/Documents/Articles/Number theory: Is a directory
/Users/math/Documents/Articles/Topology: Is a directory
/Users/math/Documents/Articles/useful: Is a directory
如何通过 SED/AWK 过滤掉包含“是目录”的每一行?
[澄清] 我想过滤掉包含Is a directory的行。