Something like:
#PBS -t 0-99
#PBS -d "~/$PBS_ARRAYID.output"
What I want to do here is to redefine the working directory of each individual job in the job array, using the job's array id. Is this valid code?
I need to know before I send to the cluster, because I can't run tests there.
Yes, you can use any of the environment variables listed here in -d, -o, or -e.