击:每个目录 [英] Bash: for each directory
本文介绍了击:每个目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的工作,需要在一个特定的文件夹中的每个子目录执行操作的脚本。
什么是写一个最有效的方法是什么?
解决方案
为D IN`找到。型D`
做
//做任何你需要的D
DONE
I am working on a script that needs to perform an action in every sub-directory of a specific folder.
What is the most efficient way to write that?
解决方案
for D in `find . -type d`
do
//Do whatever you need with D
done
这篇关于击:每个目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文