On Wed, Feb 1, 2012 at 1:45 PM, Lane Schwartz <dowob...@gmail.com> wrote: > To solve the problem, I have wrapped the above code in my > .bash_profile to first check to see if I am in a grid job: > > if [ -n "$JOB_ID" ]; then > # do stuff > else > if [ -f $HOME/.path_history/host.$HOSTNAME ]; then > cd `cat $HOME/.path_history/host.$HOSTNAME` > fi > fi
Good to know that it is working for you! Just a small suggestion - check "$ENVIRONMENT" and see if it is equal to "BATCH". I forgot whether it is defined by the IEEE standard for batch systems or somehere else, but at least it is supported by SGE and Torque. On the other hand, JOB_ID is not defined by the standard, and it is only set when the job is run under SGE. It is usually better to use a portable approach - just IMO! Rayson > > Thanks for the help debugging this! The problem now appears to be solved. > > Cheers, > Lane _______________________________________________ users mailing list users@gridengine.org https://gridengine.org/mailman/listinfo/users