Skip to content

Instantly share code, notes, and snippets.

@arunreddy
Last active July 27, 2017 01:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arunreddy/fe789413e61bd7301498a9d8bdcbeabb to your computer and use it in GitHub Desktop.
Save arunreddy/fe789413e61bd7301498a9d8bdcbeabb to your computer and use it in GitHub Desktop.
example.sh
#!/bin/ bash
# VAR1=$1
# VAR2=$2
# VAR3=$3
python example.py ${VAR1} ${VAR1} ${VAR1}
------------------------------------------------------------------------------------
Inside the python file.
import sys
var_1 = sys.argv[1]
var_2 = sys.argv[2]
var_3 = sys.argv[3]
-------------------------------------------------------------------------------------
job_runner.sh
#!/bin/bash
# P1 params: P11 P12 P13
# P2 params: P21 P22 P23
# P3 params: P31 P32 P33
for P1 in "P11 P12 P13"
# Seperated by space
do
for P2 in "P21 P22 P33"
do
for P3 in "----"
do
qsub -v VAR1="${P1}" VAR2="${P2}" VAR3="${P3}" example.sh
done
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment