如何修复bash语法错误

时间:2014-04-06 01:06:53

标签: regex bash

这是我的bash文件,

错误消息是:

command substitution: line 7: unexpected EOF while looking for matching `"'
run-n2p4.sh: command substitution: line 8: syntax error: unexpected end of file
run-n2p4.sh: command substitution: line 8: unexpected EOF while looking for matching `"'
run-n2p4.sh: command substitution: line 9: syntax error: unexpected end of file

以下是内容:

#!/bin/bash

#this used to run 1 node and 1 core, 1 node and 8 cores and 2 nodes and 8 cores
for i in $(seq 1 1); do

    SEARCH_LARGE_ONE[3]=`qsub pbs41.sh -N "CCCdata-large_3” -q fast -l walltime=00:10:00 -l nodes=2:ppn=4 -v QUERY="CCCdata-large.txt"`

    SEARCH_LARGE_TWO[3]=`qsub pbs42.sh -N "CCCdata-large_3” -q fast -l walltime=00:10:00 -l nodes=2:ppn=4 -v QUERY="CCCdata-large.txt"`

done

有人可以帮助我吗?

1 个答案:

答案 0 :(得分:3)

您需要将两个更改为"。否则,每个"命令中将有三个qsub,这是一个错误。