IDL에 프로그램을 작성하여 명령 줄 인수를 기반으로 산점도를 생성했습니다. 나는 성공적으로이 같은 터미널에서 직접 프로그램을 호출 할 수 있습니다변수가있는 bash의 IDL 프로그램 실행
idl -e "scatterplot_1_2d_file.pro" $infile $outfile $title $xtitle $ytitle $xmin $xmax $ymin $ymax $timescale
경우 $ *에 입력 한 일부 문자열 리터럴을 참조 문제는 내가 퍼팅, 난 그냥 바로 그 줄을 입력 할 수있을 거라고 생각합니다. 리터럴 대신 변수 이름으로, bash 스크립트로, 그리고 흩어져있는 동안 백만개의 분산 플롯을 생성합니다.
idl: -e option cannot be specified with batch files
그래서 나의 다음 시도가 그때 실행할 것 IDL의 배치 파일에 해당 명령을 작성하려고했다 : 나는 그런 식으로한다면 불행하게도, 나는 오류가 발생합니다.
그 시도는 다음과 같습니다
#!/bin/bash
indir=/path/to/indir/
outdir=/path/to/outdir/
files=`ls $indir`
batchfile=/path/to/tempbatchfile.pro
echo .r "/path/to/scatterplot_1_2d_file.pro" >> $batchfile
for file in $files
do
name=${file%\.*}
echo scatterplot_1_2d_file $indir$name.txt $outdir$name.jpg $name "Gauge Precipitation (mm)" "NMQ Precipitation (mm)" "*" "*" "*" "*" 2 >> $batchfile
done #done file
echo exit >> $batchfile
idl <<EOF
@/path/to/scatterplot_1_2d_file
EOF
rm $batchfile
내가 모르는 경우 스크립트가 관련이있는, 그래서 난 그냥 시작을 게시합니다 내가 나중에 나머지를 게시합니다 생성 오류의 대부분 당신이 그것을 필요로하는 경우에 :
[foo]$ bash script_thing.sh
IDL Version 6.3 (linux x86 m32). (c) 2006, Research Systems, Inc.
Installation number: 91418.
Licensed for personal use by XXXXXXXXX only.
All other use is strictly prohibited.
PRO scatterplot_1_2d_file
^
% Programs can't be compiled from single statement mode.
At: /path/to/scatterplot_1_2d_file.pro, Line 1
% Attempt to subscript ARGS with <INT ( 1)> is out of range.
% Execution halted at: $MAIN$
% Attempt to subscript ARGS with <INT ( 2)> is out of range.
% Execution halted at: $MAIN$
% Attempt to subscript ARGS with <INT ( 3)> is out of range.
% Execution halted at: $MAIN$
% Attempt to subscript ARGS with <INT ( 4)> is out of range.
% Execution halted at: $MAIN$
% Attempt to subscript ARGS with <INT ( 5)> is out of range.
% Execution halted at: $MAIN$
% Attempt to subscript ARGS with <INT ( 6)> is out of range.
% Execution halted at: $MAIN$
% Attempt to subscript ARGS with <INT ( 7)> is out of range.
% Execution halted at: $MAIN$
% Attempt to subscript ARGS with <INT ( 8)> is out of range.
% Execution halted at: $MAIN$
% Attempt to subscript ARGS with <INT ( 9)> is out of range.
% Execution halted at: $MAIN$
난 그냥 할 수없는 뭔가를 할 노력하고있어 만약 내가 모르겠지만, 그것은 아닌 것 같아. 어떤 충고?
당신은해야합니다 모든 [인용] (HTTP를 해결하기 위해 : //이 mywiki. wooledge.org/Quotes) 오류를 수정하고 특정 조언을하기 전에 [파일 이름 처리] (http://mywiki.wooledge.org/ParsingLs)를 수정하십시오. 그 후에 걸린다면 새로운 오류를 게시하십시오. – ormaaj