I have several files with the same name in different folders. I want to execute my bash script to all of them in parallel. Is it possible to put them in a separate .txt file or in the same bash script and execute?i.e,
all.tab file
path/to/set1/my.bam
path/to/set2/my.bam
path/to/set3/my.bam
and a bash,
#!/usr/bin/env bash
#$ -q cluster_name
#$ -cwd
#$ -N job_name
#$ -e /path/to/log
#$ -o /path/to/log
#$ -l job_mem=16G
#$ -pe serial 4
PICARD="path/to/picard"
BAM="/path/to/all.tab"
echo "validating bam file"
$PICARD/picard.jar ValidateSamFile I=$BAM MODE=SUMMARY
So that it is going to launch several jobs to gueue in parallel and write log outputs or other output files in the respective folders. If there is any other way, I appreciate any help. EDIT: I invoke it as: qsub ./test.sh
qsub ./test.sh path/to/set1/my.bam,qsub ./test.sh path/to/set2/my.bam, etc?