[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [HTCondor-users] Regular Expressions in -constraint


That did the trick, thank you!
>condor_q -allusers -global -const "\"lidarMatching\"==regexps(\"([0-9]+)(_)([A-Za-z]+)\",JobBatchName,\"\\3\")"

-- Schedd: HOST: <IP:PORT?... @ 11/07/19 17:06:34
OWNER    BATCH_NAME                                 SUBMITTED   DONE   RUN    IDLE   HOLD  TOTAL JOB_IDS
<userid>    191107130958_lidarMatching_DAG.dag+2249  11/7  13:09     59      7    191      _    265 2348.0 ... 2545.0
<userid>     191107131244_lidarMatching_DAG.dag+2256  11/7  13:12     17      _    256      _    293 2546.0 ... 2801.0
<userid>     191107131308_lidarMatching_DAG.dag+2275  11/7  13:13     14      _    246      _    283 2802.0 ... 3047.0

Appreciate the tips on those two utilities, I will have a look.


-----Original Message-----
From: HTCondor-users <htcondor-users-bounces@xxxxxxxxxxx> On Behalf Of Todd Tannenbaum
Sent: Thursday, November 7, 2019 12:08 PM
To: HTCondor-Users Mail List <htcondor-users@xxxxxxxxxxx>
Subject: Re: [HTCondor-users] Regular Expressions in -constraint

This email is not from Hexagonâs Office 365 instance. Please be careful while clicking links, opening attachments, or replying to this email.

> Following Christophâs example I also tried:
> condor_q -nobatch -const â âlidarMatchingâ == 
> regexps(ââ(lidarMatching)ââ, JobBatchName, ââ\1ââ) â

Hi Mark,

With windows cmd.exe (default shell in a command prompt window), you need to backwhack (leading backslash) in front of the double quotations going to HTCondor, and also the backslash itself.

So try something like:
 condor_q -nobatch -const "\"lidarMatching\"==regexps(\"(lidarMatching)\",JobBatchName,\"\\1\")"

Another option would be to use a shell that is a little more friendly with quoting, like bash.

FWIW, on my Windows 10 laptop I am a big fan of 'cmder', which is a replacement command prompt window. Not only does it look very nice, it allows you to select between cmd.exe or bash, and it also gives you practically every common Linux command line utility on Windows (git, grep, find, etc).

You can even install cmder quick and easy via Chocolatey, which is a package manager for Windows (like yum or apt-get).

Yes,  I like having my Windows laptop "feel like" Unix :)


HTCondor-users mailing list
To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe
You can also unsubscribe by visiting

The archives can be found at: