Created
March 25, 2014 23:37
-
-
Save nmpowell/9773824 to your computer and use it in GitHub Desktop.
Function to delete all Sun Grid Engine (SGE) jobs with a given string in their name
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 qda() { | |
# Delete all jobs containing $1 in their (shortened) name | |
jobName=$1 | |
# Get list of job numbers | |
jobList=$(echo "`qstat`" | grep "${jobName}" | awk '{print $1;}') | |
# Delete individually | |
for job in ${jobList} | |
do | |
qdel ${job} | |
done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment