Hi,
As I am new to batch and using the case statement for the 1st time, can anyone help me in understanding what is missing in the code below.
Do I need to define "command" before using it in for condition?
Thanks in advance
#!bin/bash -l
## PBS Directives
#PBS -q default
#PBS -l nodes=1
pn=4
#PBS -l mem=25GB
#PBS -l walltime=10:00:00
#PBS -A ccg-ngs
#PBS -m abe
#PBS -M ......
#PBS -o /scratch/tmp/v_stdout/${PBS_JOBNAME}.o${PBS_JOBID}
#PBS -e /scratch/tmp/v_stderr/${PBS_JOBNAME}.e${PBS_JOBID}
inp=$input
echo inp:$inp
for command in 1 2 3 4
do
case command in
1)
/path/SVDetect_r0.8/bin/SVDetect linking -conf $inp;;
2)
/path/SVDetect_r0.8/bin/SVDetect filtering -conf $inp;;
3)
/path/SVDetect_r0.8/bin/SVDetect links2circos -conf $inp;;
4)
/path/SVDetect_r0.8/bin/SVDetect links2SV -conf $inp;;
esac
done
As I am new to batch and using the case statement for the 1st time, can anyone help me in understanding what is missing in the code below.
Do I need to define "command" before using it in for condition?
Thanks in advance
#!bin/bash -l
## PBS Directives
#PBS -q default
#PBS -l nodes=1
pn=4#PBS -l mem=25GB
#PBS -l walltime=10:00:00
#PBS -A ccg-ngs
#PBS -m abe
#PBS -M ......
#PBS -o /scratch/tmp/v_stdout/${PBS_JOBNAME}.o${PBS_JOBID}
#PBS -e /scratch/tmp/v_stderr/${PBS_JOBNAME}.e${PBS_JOBID}
inp=$input
echo inp:$inp
for command in 1 2 3 4
do
case command in
1)
/path/SVDetect_r0.8/bin/SVDetect linking -conf $inp;;
2)
/path/SVDetect_r0.8/bin/SVDetect filtering -conf $inp;;
3)
/path/SVDetect_r0.8/bin/SVDetect links2circos -conf $inp;;
4)
/path/SVDetect_r0.8/bin/SVDetect links2SV -conf $inp;;
esac
done
Comment