How I can include simple Linux commands in the relevance?

Apologies for the beginners question.

How I can include simple Linux commands in the relevance? For example:
Systems with the Broadcom network card
[root@qaectlsqpsrvp16 ~]# lspci | grep Broadcom
10:00.0 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709S Gigabit Ethernet (rev 20)
10:00.1 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709S Gigabit Ethernet (rev 20)
15:00.0 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709S Gigabit Ethernet (rev 20)
15:00.1 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709S Gigabit Ethernet (rev 20)
1a:00.0 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709S Gigabit Ethernet (rev 20)
1a:00.1 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709S Gigabit Ethernet (rev 20)
[root@qaectlsqpsrvp16 ~]#

No need to apologize, we were all beginners at some point.

Relevance can be thought of as a read-only language. If you are looking to create relevance to retrieve data for use in a property/analysis, or craft applicability relevance for fixlets/tasks, then you are restricted to using only the inspectors found within the BigFix Client (see: Client Relevance Guide).

If Relevance were allowed to execute programs on the machine, there is no guarantee that the BigFix Client can enforce on that program to prevent it from changing something. The only way to instruct the BigFix Client to execute a program would be to take an action, and issue the commands neccessary (using the BigFix Action Script language) saving the result to say a file. You could then use the available inspectors to read that file and return the contents.

For this specific case, there are multiple different approaches you could leverage to collect the data. You can (as you have started doing) simply take the action to run this command and capture it in a file, then either create a property/analysis or issue a BigFix Query to collect the results.

Alternativly without calling lspci:

lines whose (it as lowercase contains "broadcom") of file "/var/log/dmesg"

As an aside, the information lspci displays is also available as “files” that normal inspectors can read directly from.

To see if there are any Broadcom Corporation network interface cards:

exists (lines whose (it contains "0x14e4" or it contains "0x1166") of file "vendor" of folder "device" of it) of folders of folder "/sys/class/net"

True: at least 1 card exists
False: no cards exist

Hopefully this helps out a little.

@MDMike is correct, relevance cannot execute OS level commands. However, you can do the reverse by putting relevance in actionscript commands Using Substitution.

MDMike, thank you for the explanation and ideas!

Aleksandr