I have the below bash script, but rather that I get the command executed stored in
cmd it prints
: command not found. I executed the command with the following way:
$ 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="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]
What did I do wrong?