Is there any way to get the location of the Bash script from within, when it's being launched in a PBS job?

I tried $BASH_SOURCE, but it contains another path to the job folder, instead of the one, where the script is located. I've also tried echo $PBS_HOME, "$0" and "$PWD", but none of them contains the folder...

  • Is there something along the lines of PBS_O_WORKDIR that would solve your problem in a more direct manner? – Jeff Schaller Aug 27 '18 at 0:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.