我有下面的 bash 脚本,但我得到了存储在其中执行的命令cmd[1]
prints [1]: command not found
。我用以下方式执行了命令:
$ qsub -J 1-33 sicer-pbs.sh
#!/bin/bash
# Usage: qsub -J 1-33 sicer-pbs.sh
#PBS -N sicer
#PBS -l select=1:ncpus=1:mem=8G
#PBS -l walltime=30:00:00
# Generic PBS commands
source /usr/share/modules/init/bash;
module load python;
sleep $(( ($PBS_ARRAY_INDEX % 10) * 15 ));
cmd[1]="sh /usr/local/SICER_V1.1/SICER/SICER.sh /home/lorencm/bed/B1-C1-C7/ /home/lorencm/bed/B1-C1-C7/0000-C1.single.bed /home/lorencm/bed/B1-C1-C7/0006-C7.single.bed /home/lorencm/bed/B1-C1-C7/output btryoni 1 200 150 0.739196477788 600 0.01"
echo $cmd[$PBS_ARRAY_INDEX]
$cmd[$PBS_ARRAY_INDEX]
我做错了什么?