I\'m having an issue passing variables to a Bash script using QSub.
Assume I have a Bash script named example. The format of example is the following:
Not sure which batch scheduler you are using but on PBSPro or SGE then submitting with qsub example.sh this is a test
should do what you want.
The Torque batch scheduler doesn't (AFAIK) allow passing command line arguments to the script this way. You would need to create a script looking something like this.
#!/bin/bash
echo $FOO
Then submit it with a command like:
qsub -v FOO="This is a test" example.sh