我希望有一个for循环来检查当前目录中的文件以及2个特定的“子子目录”,分别称为folder1和folder2。而不是去:
for file in *
do stuff
done
for file in "./sub_dir/folder1"/*
do stuff
done
for file in "./sub_dir/folder2"/*
do stuff
done
有没有办法用一个for循环来完成所有这些工作?类似于
for file in * || "./sub_dir/folder1"/* || "./sub_dir/folder2"/*
do stuff
done