Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Command line `qdel` command with wildcard operator

Say I have a list of jobs scheduled on a cluster and I want to remove some of those jobs.

Normally I would use qdel followed by the job number.

However, I'd like to delete 10s of jobs so I thought I could use * as a wildcard operator like so:

qdel 11763*

I thought this would remove jobs 117630 to 117639. However I get a illegally formed job identifier error.

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

like image 609
atomh33ls Avatar asked Sep 15 '14 12:09

atomh33ls


1 Answers

It seems like qdel requires explicit, individual job IDs. But Bash has a way to generate lists of sequential numbers easily:

qdel {117630..117639}

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

qdel 11763{0..9}
like image 177
John Zwinck Avatar answered Nov 14 '22 12:11

John Zwinck