[email protected] writes: > Hello all, > I imagine there is a way to do this, but I can't figure it out. > Suppose a user submits 100 jobs, and realizes they want to cancel > JOBID 1000-1050, but not 1051+. Is there a way to use regular > expressions (or something) to do so?
scancel can take a list of jobids on the command line. So via command substitution you could use one of the command line utilities that can expand a "hostlist" For example, scancel $(hostlist -ed' ' 1238[4-7]) mark > > I tried: > scancel 1238[6-7] > scancel: error: Invalid job ID 1238[6-7] > > scancel "1238[6-7]" > scancel: error: Invalid job ID 1238[6-7] > > For the following jobs: > > JOBID USER START_TIME NAME CPUS TIME STATE > 12386 amarko 2012-06-19T14:42:42 sleep 1 1:19 RUNNING > 12387 amarko 2012-06-19T14:42:42 sleep 1 1:19 RUNNING > 12385 amarko 2012-06-19T14:42:41 sleep 1 1:20 RUNNING > 12384 amarko 2012-06-19T14:42:39 sleep 1 1:22 RUNNING > > Thanks, > > Adam Marko > ------------------------------ > Adam C. Marko > Bioinformatics Analyst III > Asuragen, Inc<http://www.asuragen.com/> > 512-681-5303
