OOD templates these shell scripts then submits the main one to the scheduler. At this point, it’s in the scheduler hands (and runtime). Then the environment becomes just Linux/bash. This is where I think the issue is.
If you’re still having problems, to help diagnose the issue, let’s remove OOD from the equation. I would suggest navigating to a directory that this batch job created, looking at the resulting shell scripts, modifying them and resubmitting them by hand (with whatever debug statements you need) to see what’s really going on.
# here's an example one that I have
# here's how that directory may differ
In this directory you’ll see a
job_script_content.sh This was the shell script that was submitted to your scheduler. Look at it to see what the result was and if it’s what you’d expect.
Now you can re-submit this script in this working directory. In moab/torque parlance it’s
qsub -d $(pwd) job_script_content.sh. With this, you can play around with the formatting
Hope that helps! Let us know what you find.