我得到了这个意外的"完成"令牌错误
echo -e "Enter the file stem name"
read filestem
for i in {1..22}
do
    `java -cp /export/home/alun/jpsgcs/ CMorgansToTheta $filestem_$i.INPUT.par $filestem_$i.THETA.par`
done
如果Java程序没有向输出写入任何内容,那么你的for循环是等效的(因为反引号)
for i in {1..22}
do
done
这会产生你看到的错误.您可能只想删除反引号以运行程序22次:
echo -e "Enter the file stem name"
read filestem
for i in {1..22}
do
    java -cp /export/home/alun/jpsgcs/ CMorgansToTheta "${filestem}_$i.INPUT.par" "${filestem}_$i.THETA.par"
done