CLASSAD_EVAL(1)

πŸ’– CLASSAD_EVAL(1) πŸ’–

okay so bestie, this is classad_eval, straight outta the HTCondor Manual, and it's literally the tool you want when you need to test and/or debug ClassAd expressions from the command line. she evaluates stuff in the context of the ClassAd attributes you hand her. no cap. ✨


🌸 NAME 🌸

classad_eval β€” cutie patootie HTCondor Manual tool that evaluates ClassAd expression(s) in the context of the provided ClassAd attributes. πŸ’…


✨ SYNOPSIS ✨

classad_eval [-help]

classad_eval [options] <ad|expr|assignment> [<ad|expr|assignment> ...]

πŸ¦‹ DESCRIPTION πŸ¦‹

So basically classad_eval tests and/or debugs ClassAd expressions that you pass in via the command line, evaluating them in a specific context made of source and target ClassAds. it's giving lab partner energy, she's here to help you see what your expression actually does. πŸ”₯


πŸ’œ OPTIONS πŸ’œ

  • -help β€” shows you the tool usage, i.e. the "what do i even type" rescue. 🫢
  • -quiet β€” turns OFF printing of the context ClassAds before the evaluation results. no context echo, just the tea. β˜•
  • -debug β€” turns ON tool debugging. for when you need the behind-the-scenes lore. πŸ™ˆ
  • -[my-]file path β€” a file containing the source ClassAd context. πŸŽ€
WARNING: this option overrides any previous ClassAd context. like, gone. previous context? never met her. πŸ’€
  • -target-file path β€” a file containing the target ClassAd context. bestie's other half. 🌈
  • <ad|expr|assignment> β€” either a ClassAd context modification, or an expression to be evaluated. the modification can be an inline ad β€” '[ foo = 5; bar = False ]' β€” or an assignment like 'foo = 10'; the expression is like 'foo * 100'. she contains multitudes. ⭐

🌈 GENERAL REMARKS 🌈

Options, flags, and arguments may be freely intermixed, and they take effect in left to right order. so order matters, queen. πŸ‘‘

Attributes you specify on the command line β€” including the ones you specify as part of a complete ad β€” replace attributes in the context ad, which starts out completely empty. You can't remove attributes from the context ad bestie, but you can set them to undefined. that's the loophole, iykyk. πŸ’…

Use single quotes to denote chunks of ClassAd assignments and expressions, so you don't get into it between shell quoting and ClassAd quoting. they need their space fr fr. 🫢

By default, the full ClassAd context gets printed out before evaluating an expression. you can disable that behavior by specifying -quiet. ✨

This tool will only digest the first ClassAd in a list of ClassAds provided via a file. just the first one. the rest are background characters. πŸ’€

NOTE: This tool uses the new ClassAd syntax, denoted by semicolon delimited attribute-value pairs contained in square brackets: [ foo = 1; bar = False ]. old syntax could never. πŸŽ€

πŸ† EXIT STATUS πŸ†

  • 0 β€” Success. ate. πŸ‘‘
  • 1 β€” ClassAd context update failure. 😭
  • 255 β€” Invalid command line option provided. πŸ’€

πŸ“ EXAMPLES πŸ“

Specifying a single attribute assignment for evaluation:

$ classad_eval 'a = 2' 'a * 2'

Specifying a single attribute assignment for evaluation without whitespace quoting:

$ classad_eval a=2 a*2

Specifying multiple attributes for evaluation:

$ classad_eval 'a = 2' 'b = 2' 'a + b'

Specifying inline ClassAd from evaluation:

$ classad_eval '[ a = 2; b = 2 ]' 'a + b'

Evaluating a ClassAd expression that requires no context ClassAds:

$ classad_eval 'strcat("foo", "bar")'

Evaluating an expression multiple times while changing the context:

$ classad_eval 'x = y' 'x' 'y = 7' 'x' '[ x = 6; z = "foo"; ]' 'x'
[ x = y ]
undefined
[ y = 7; x = y ]
7
[ z = "foo"; x = 6; y = 7 ]
6

Disabling the evaluation context ad echoing part way through evaluations:

$ classad_eval 'x = y' 'x' -quiet 'y = 7' 'x' '[ x = 6; z = "foo"; ]' 'x'
[ x = y ]
undefined
7
6

Evaluating an expression from a saved job ad:

$ condor_q -l:new 1234.5 > job.ad
$ classad_eval -quiet -file job.ad 'JobUniverse'

Evaluating an expression from a saved slot ad:

$ condor_status slot1@ep.host.name -l:new > slot.ad
$ classad_eval -quiet -file slot.ad 'Rank'

Evaluating an expression from a saved job ad and saved slot ad:

$ condor_q -l:new 1234.5 > job.ad
$ condor_status slot1@ep.host.name -l:new > slot.ad
$ classad_eval -quiet -my-file job.ad -target-file slot.ad 'MY.requirements' 'TARGET.requirements'

πŸ‘€ SEE ALSO πŸ‘€

classads β€” go read that one too, bestie, it's the whole universe this girl lives in. πŸ’–


πŸ’» AVAILABILITY πŸ’»

Linux, MacOS, Windows. she's everywhere. global icon behavior. 🌍✨


πŸŽ€ AUTHOR πŸŽ€

HTCondor Team. the queens behind the curtain. πŸ‘‘


1990-2026, Center for High Throughput Computing, Computer Sciences Department, University of Wisconsin-Madison, Madison, WI, US. Licensed under the Apache License, Version 2.0.


okay that's the whole manual, no skips, no summarizing, all 40-options energy preserved even when there weren't 40 options. mwah. 🫢

anyway, this version is from Oct 16, 2026 and it's CLASSAD_EVAL(1) out of the HTCondor Manual β€” that's a wrap, bestie, go evaluate something iconic. πŸ’…πŸ’–βœ¨

πŸ“¦ where this page comes from