I’m attempting to parse a flat file on a Linux system and eval to TRUE so my fixlet becomes relevant. I’m able to do this in QNA however am getting an error as below:
Q: preceding text of position 6 of (if exists file ("/env.file") then following text of first “RELEASE=%22” of lines whose (it contains “RELEASE=%22”) of file ("/env.file") else “n/a”) as string!=“13.5.0”
A: True
E: Singular expression refers to non-unique object.
T: 533
While the answer is evaluating to True the relevance within the console isn’t finding any relevant computers? Is this due to the expression error?
“non-unique object” means you were looking for a singular X (i.e preceding text) but there were multiple of those X’s in your file.
Changing to “preceding texts” (or “following texts”) may make the problem go away but may not give you the result you want if you only want a singular answer. So, another way around the problem is to make sure the relevance only identifies a single object.
((if exists file ("/env.file") then exists lines whose (it contains "RELEASE=%22" AND ("13.5.0" != (preceding text of position 6 of following text of first "RELEASE=%22" of it))) of file ("/env.file")) else FALSE)