||
1. 多个文件的循环
foreach event (20*)
end
2. 判断存在与否
if(-d $event) then | -d 判断文件夹是否存在
if(-e flag_SNR.dat) | -e 判断文件是否存在
! -e 文件不存在为真
3. touch flag.dat | 生成一个空文件
4. Command: csh ex01.csh 1.txt 2.txt
in ex01.csh: set file1=$1; set file2=$2 即可把文件名赋值给字符变量$file1,$file2
类似于fortran里面的getarg (call getarg(1,file1);call getarg(2,file2))
5. execute<inputfile | 单一输入文件的可执行文件
6. 运行符号``
set para1 = `awk '{print $1}' 1.txt`
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-5-21 18:04
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社