【发布时间】:2020-09-27 07:47:05
【问题描述】:
相关:Loop through all the files with a specific extension
我想遍历匹配某个模式的文件:
for item in ./bob* ; do
echo $item
done
我有一个像这样的文件列表:
bob
bobob
bobob.log
我只想列出没有扩展名的文件:
bob
bobob
存档的最佳方式是什么? - 我可以在循环中以某种方式执行,还是需要在循环中使用 if 语句?
【问题讨论】: