For循环在多个文件夹中的文件 - bash shell的 [英] For loop for files in multiple folders - bash shell

查看:567
本文介绍了For循环在多个文件夹中的文件 - bash shell的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要从多个目录中的文件在for循环中。
至于现在,我有以下的code:

I need to have files from many directories in a for loop. As for now, I have the following code:

for f in ./test1/*;
...
for f in ./test2/*;
...
for f in ./test3/*;
...

在每个循环我在做同样的事情。有没有办法从多个文件夹中获取文件?

In each loop I'm doing the same thing. Is there a way to get files from multiple folders?

在此先感谢

推荐答案

尝试在./ {TEST1,TEST2,TEST3} / * 或<$ C $ F C>为这取决于你想要什么./*/*

这篇关于For循环在多个文件夹中的文件 - bash shell的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆