标签: for-loop csh
以下bash for循环的C-shell是什么?
for file in *.com; do mv $file /home/Scratch/$file; done
答案 0 :(得分:1)
不幸的是,你不能在C-shell脚本中有一行for循环。如果您经常使用它,那么您可以做的最好的事情就是创建一个脚本文件。
foreach file (*.com) mv $file /home/Scratch/$file end