2015/05/10

irafで設定した変数を使って unixコマンドを(iraf上で)実行する方法
(how to execute UNIX commands using iraf variables on iraf term.)

print 関数を使って表示した文字列を cl にパイプしたらいい
(Just pipe the STDOUT of print func. to cl.)

cl > line = "dirname"
cl > print ("!ls -l ", line, "| head") | cl

実際に実行したコマンド文字列は以下の通り
!ls -l dirmane | head


0 件のコメント: