-
-
Save hokru/4170c87ddfd39ef0b953 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scrdir () { | |
tmp=tmp.job.info | |
JOBID=$1 | |
qstat -j $JOBID > $tmp | |
JOBNAME=`cat $tmp | grep "job_name:" | awk '{print $2}'` | |
qstat -u $USER > $tmp | |
XXX=`cat $tmp | grep " ${JOBNAME:0:10} " | awk '{print $8}'` | |
YYY=`echo "${XXX%.ibp.cz}"` | |
node=`echo ${YYY:(-3)}` | |
echo "NODE: $node" | |
TMPSCR=/var/autofs/scratch/$node/$USER/$JOBNAME.$JOBID/ | |
echo "changing to scratch dir: $TMPSCR !" | |
cd $TMPSCR | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment