Qselect -h not working in accordance with the man page

My interpretation of the qselect usage for -h is I provide a list containing any combination of the letters uops or just n.

In practice I get:
% qselect -h ops
qselect: illegal -h value
usage: qselect [-a [op]date_time] [-A account_string] [-c [op]interval]
[-h hold_list] [-H] [-J] [-l resource_list] [-N name] [-p [op]priority]
[-q destination] [-r y|n] [-s states] [-t subopt[op]date_time] [-T] [-P project_name]
[-x] [-u user_name]
qselect --version

qselect -h with a single letter is ok
Bug, documentation error or misinterpretation?
Thank you.
Cheers.
JohnM

man page for qselect describes -h as below

-h
Restricts the selection of jobs to those with a specific set of hold types. The holds in the Hold_Types job attribute must be the same as those in the hold list argument, but can be in a different order.

       The hold list argument is a string consisting of the single letter n, or one or more of the letters u, o, p, or s in any  combination.   If letters are duplicated, they are treated as if they occurred once.  The letters represent the hold types:

       Letter   Hold Type
       ---------------------------------------------------------------
       n        None
       u        User
       o        Other
       p        Bad password
       s        System

How to use -h in qselect ?
[pbsdata@pbspro ~]$ for i in {1…10};do qsub -l select=1:ncpus=4 – /bin/sleep 1000 ; done
253.pbspro
254.pbspro
255.pbspro
256.pbspro
257.pbspro
258.pbspro
259.pbspro
260.pbspro
261.pbspro
262.pbspro

[pbsdata@pbspro ~]$ qhold 261 262 260

[pbsdata@pbspro ~]$ qselect -h u
260.pbspro
261.pbspro
262.pbspro

Thank you for the clarification. My misunderstanding arises from the statement β€œThe hold_list argument is a string consisting of the single letter n, or one or more of the letters u, o, p, or s in any combination.”

One or more of the letters indicates the hold_list could be a string e.g. uop. If that is not the case then I believe the man entry needs to be reworded. e.g. β€œThe hold_list argument is a single letter from the set n, u, o, p, or s.”

I suspect I have still not fully understood the usage for this option.

By the way I have achieved what I needed by doing the following:
{ qselect -h o & qselect -h p & qselect -h s; }

Cheers.

1 Like