- 积分
- 3064
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2011-6-20
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
有时候,我们写好了程序,只需按顺序运行一遍,但执行次数会比较多,所以进入交互界面一次次手动编译执行是不明智的,自然脚本的优势就出来了。这里用了shell中here-document的特点,直接看例子
pro test
print,'ok'
end
这是要执行的idl程序
!#/bin/sh
idl << q
.r test.pro
test
exit
q
这是shell脚本,q是here document的标志,两个q之间的命令跟在idl交互界面下输入没什么差别。编辑好后添加可执行属性,chmod +x test.sh, 运行 ./test.sh 显示结果如下
IDL Version 7.1.1 (linux x86 m32). (c) 2009, ITT Visual Information Solutions
Installation number: 20111111.
Licensed for use by: TEAM TBE
% Compiled module: TEST.
ok
|
评分
-
查看全部评分
|