Command line `qdel` command with wildcard

Say I have a list of tasks scheduled in a cluster and I want to delete some of these tasks.

I usually used qdel followed by the job number.

However, I would like to remove 10 jobs, so I thought I could use * as a wildcard:

qdel 11763*

I thought this would delete jobs from 117630 to 117639. However, I get an illegally formed job identifier error.

Does anyone know a way to use wildcard operators in this context?

+5
source share
1 answer

qdel require explicit individual job identifiers. But Bash has a way to easily generate lists of consecutive numbers:

 qdel {117630..117639} 

This will expand in the shell to invoke qdel with all the numbers in the range. You can also do this:

 qdel 11763{0..9} 
+8
source

Source: https://habr.com/ru/post/1202592/


All Articles