How to find the version of the Eracent Agent

Valued Contributor II

Anybody using eracent? I'm looking for a way to pull the version of the agent installed, but it doesn't show up under plugins or installed applications. I could scope off the installed package, but was hoping for a better way to check against the app as that can get messy once multiple packages are brought in.



Never used it before but perhaps it has some info in a plist located within the app/agent.

Example when I check Microsoft Excels version I run:

defaults read /Applications/Microsoft Office 2011/Microsoft CFBundleShortVersionString

Perhaps a starting point? Hope you get it figured out!

Valued Contributor II

it doesn't seem to have a plist file, i found an XML file that does have the Version= that I need, but not sure how to extract the data.

Valued Contributor II

just guessing,
awk -F= '/Version/{print $2"}' xmlfile


@nessts beat me to it. Was on a conference call and when I finished (apparently I didn't have enough fight in me to be on the call and hit the "Post It" button) he already answered it.

Hope is one liner helps out. If not please post the xml or relative portion.

Valued Contributor II

I appreciate you guys taking the time to look at this!

<?xml version="1.0" encoding="utf-8" ?>
    Version="" >

when I tried the awk command it returned this...(note, I tried with the " as shown in your example, as well as some variations there-of to get it to work; all returned the below behavior

sudo awk -F='/Version/{print $2}' /private/var/Eracent/EPA/conf/ScannerConfig.xml 
awk: syntax error at source line 1
 context is
     >>> /private/var/Eracent/EPA/conf/ScannerConfig. <<< xml
awk: bailing out at source line 1

Legendary Contributor III
awk -F'"' /Version/{print $2}' /path/to/xmlfile

should do it.

Edit: BTW, the reason you were getting that error is because you weren't including a space between the -F= and '/Version/{print $2}' Look closely at what @nessts][/url posted and you'll see the space between them.