Workhorse
Workhorse

Reputation: 1560

Output multiple files SGE

I have a .sh script that looks like this:


#$ -t 1-8
#$ -tc 8


#list of tasks
task_list=$( sed "${SGE_TASK_ID}q;d"  list_of_jobs.txt )

#python script 
./ldsc.py \
--h2 ${task_list} \
--ref-ld-chr /baselineLD. \
--out $cts_name \

I am running 8 jobs in parallel, but need each of them to output a separate file using the --out flag.

How can I do this?

The list_of_jobs.txt is a list of eight files (tasks) that get analyzed.

file1.txt
file2.txt
file3.txt
…
file8.txt

Upvotes: 0

Views: 33

Answers (1)

Workhorse
Workhorse

Reputation: 1560

figured it out. basename="${cts_name##*/}"

and then --h2 $basename was the trick!

Upvotes: 0

Related Questions