Last active
September 14, 2021 06:16
-
-
Save mjhong0708/4410fac8571391d23072b7040e0683d0 to your computer and use it in GitHub Desktop.
gotojob
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
function gotojob { | |
if (( $# == 0 )); then | |
echo "gotojob v0.1.0 by Minjoon Hong" | |
echo "change current directory to working directory of a slurm job" | |
echo "usage: $FUNCNAME [SLURM_JOBID]" | |
return | |
fi | |
workdir=$(scontrol show job $1 | grep Dir | awk -F '=' '{print $2}') | |
cd $workdir | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment