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

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



Todd,

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.

Regards,
Mark

-----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).
See
  https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcmder.net%2F&amp;data=02%7C01%7C%7Ccf6b7c1e686f473cb99208d763a56c12%7C1b16ab3eb8f64fe39f3e2db7fe549f6a%7C0%7C1%7C637087434443508036&amp;sdata=%2BkC2iaTXZ97FlPBsNOvQh7q%2FNnLBbEhyuNmmNG8wXv4%3D&amp;reserved=0

You can even install cmder quick and easy via Chocolatey, which is a package manager for Windows (like yum or apt-get).
See
  https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fchocolatey.org%2F&amp;data=02%7C01%7C%7Ccf6b7c1e686f473cb99208d763a56c12%7C1b16ab3eb8f64fe39f3e2db7fe549f6a%7C0%7C1%7C637087434443508036&amp;sdata=uTvQfp4Nk7dh4QnNtLLbUBxU7qbsn%2By3RMkyfNDWOoo%3D&amp;reserved=0

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

regards
Todd


_______________________________________________
HTCondor-users mailing list
To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe
You can also unsubscribe by visiting
https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.cs.wisc.edu%2Fmailman%2Flistinfo%2Fhtcondor-users&amp;data=02%7C01%7C%7Ccf6b7c1e686f473cb99208d763a56c12%7C1b16ab3eb8f64fe39f3e2db7fe549f6a%7C0%7C1%7C637087434443508036&amp;sdata=DM3FGOZEl0Ki2AwD2hek5Rz34HhVBDJEP6zjnNtqVfA%3D&amp;reserved=0

The archives can be found at:
https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.cs.wisc.edu%2Farchive%2Fhtcondor-users%2F&amp;data=02%7C01%7C%7Ccf6b7c1e686f473cb99208d763a56c12%7C1b16ab3eb8f64fe39f3e2db7fe549f6a%7C0%7C1%7C637087434443508036&amp;sdata=9Lm6LN3KJ81vRLAQ95%2B6sxk8%2FmrvIwhpfagOlc%2Bq70o%3D&amp;reserved=0