在csh中循环文件名模式

时间:2014-01-26 17:24:20

标签: for-loop csh

以下bash for循环的C-shell是什么?

for file in *.com; do mv $file /home/Scratch/$file; done

1 个答案:

答案 0 :(得分:1)

不幸的是,你不能在C-shell脚本中有一行for循环。如果您经常使用它,那么您可以做的最好的事情就是创建一个脚本文件。

foreach file (*.com)
  mv $file /home/Scratch/$file
end