Sometimes, when I run jobs in a PBS cluster, I really want joblog (-o file) to be in two places. One in $PBS_O_WORKDIR to save all together and one ${HOME}/jobOuts/ for greping / awking / etc ...
Running a test from the command line works with tee :
echo "hello" | qsub -o `tee $HOME/out1.o $HOME/out2.o $HOME/out3.o`
But as soon as I try to put this in my PBS script, it does not work if I put it in a PBS script and qsub
Here is qsub and the error:
qsub TEST.pbs qsub: directive error: -o `tee TEE_TEST.o TEE_TEST.${PBS_JOBID}.o`
I tried a few more things below - nothing worked.
One line -o (comma, semi-colon, and space):
#PBS -o ${PBS_JOBNAME}.${PBS_JOBID}.o,${HOME}/jobOuts/${PBS_JOBNAME}.${PBS_JOBID}.o
and two lines:
#PBS -o ${PBS_JOBNAME}.${PBS_JOBID}.o
In two working liners, only the second option is -o, and one liner does not work.
Any suggestions? Is it possible?
source share