Reducing the need to use a filename in a relevance clause

Hi,

I tried tinkering with this relevance to try to use file “/var/tmp/patch_group” te least amount of times possible, but I don’t seem to be able to get it to work.

(exists file "/var/tmp/patch_group") AND 
(exists lines whose (it starts with "Patch Day:" and it contains "Monday") of file "/var/tmp/patch_group") AND 
(exists lines whose (it starts with "Patch Time:" and it contains "01:00") of file "/var/tmp/patch_group") AND 
(exists lines whose (it starts with "Reboot Day:" and it contains "Tuesday") of file "/var/tmp/patch_group") AND 
(exists lines whose (it starts with "Reboot Time:" and it contains "01:00") of file "/var/tmp/patch_group")

The windows version of the above needs to use parent folder of parent folder of parent folder of client folder of site “actionsite”/patch_group, and would look even uglier if I needed to repeat the file name 5 times…

I tried to replace file “/var/tmp/patch_group” with it and the end the clause with of file “/var/tmp/patch_group”, but I’m not having any luck.

Thanks,
Bob_K

Let us know if this works…

exists file "/var/tmp/patch_group" whose (
 exists lines whose (it starts with "Patch Day:" and it contains "Monday") of it 
 AND exists lines whose (it starts with "Patch Time:" and it contains "01:00") of it 
 AND exists lines whose (it starts with "Reboot Day:" and it contains "Tuesday") of it 
 AND exists lines whose (it starts with "Reboot Time:" and it contains "01:00") of it
)
2 Likes

@JasonWalker,

That works!!!

Thanks,
Bob K