Browse Source

chore(nml): update script to delete all nsg jobs

Ankur Sinha (Ankur Sinha Gmail) 10 months ago
parent
commit
dd815fcd77
1 changed files with 17 additions and 0 deletions
  1. 17 0
      NeuroML2/clean-nsg-jobs.sh

+ 17 - 0
NeuroML2/clean-nsg-jobs.sh

@@ -0,0 +1,17 @@
+#!/bin/bash
+
+# Copyright 2023 Ankur Sinha
+# Author: Ankur Sinha <sanjay DOT ankur AT gmail DOT com> 
+# File : 
+#
+
+
+nsgr_job -l | cut -f2 -d ' ' > joblist.txt
+
+while IFS="" read -r line ; do
+    echo "Deleting job: ${line}"
+    nsgr_job -j ${line} -r
+done < joblist.txt
+
+echo "All jobs deleted"
+echo "Please delete joblist.txt"