我想在每个文件夹中创建文件。这是我的命令
for i in `ls`;do cd $i;touch test.txt;done
-bash: cd: 10/: No such file or directory
-bash: cd: 2/: No such file or directory
-bash: cd: 3/: No such file or directory
-bash: cd: 4/: No such file or directory
-bash: cd: 5/: No such file or directory
-bash: cd: 6/: No such file or directory
-bash: cd: 7/: No such file or directory
-bash: cd: 8/: No such file or directory
-bash: cd: 9/: No such file or directory
它仅test.txt在文件夹中生成1/,其余文件夹为空白。我认为原因是我的命令缺乏{ }澄清LOOP的规模。
你能帮我更新我的命令吗?
白猪掌柜的
湖上湖