我已经在 bash 中编写了这个脚本
for f in $FILES
do
echo "Processing file... $f"
# take action on each file. $f store current file name
B=$(basename $f)
filename="${B%.*}"
mkdir $BASEDIR/$RESULTS/$filename
./../graphic_file_gen $f > $BASEDIR/$RESULTS/$filename/data.txt
cd $BASEDIR/$RESULTS/$filename/
gnuplot << EOF
do for [i=0:33] { number = i-2 set term png set output "fotorivelatore".number.".png" unset key set title "Fotorivelatore ".number plot [:16384] [:40000] 'data.txt' using 0:i with linespoints } EOF
#./../test2 $f
cd $BASEDIR/$DECADIMENTI/
done
但它给了我这个错误:
Syntax error: end of file unexpected (expecting "done")
我该如何解决这个问题?
答案1
将您的内容放在EOF
新行中
看这里的文件。