using shell script output as a paramter for smart group

ChrisJScott-wor
New Contributor III

This may make no sense, but it's worth a shot...

I'm working on determining whether or not users who have installed SketchUp 2016 are licensed or just in demo mode. I've determined that you can find this out if you look at the contents of ~/Library/Application Support/SketchUp 2016/liclog.txt - there's line near the end of the file that says either "Trial" or "Not Trial."

I'd like to write a shell script that uses grep to return a simple 0 or 1 depending on whether or not it finds "Not Trial" in this file. I'd like to INCLUDE that result as a part of a smart computer group definition, basically, creating a query like:

"List out computers that have SketchUp 2016. app installed AND the liclog.txt file contains "Not Trial""

Probably not do-able but sure would be great if it was... any thoughts?

3 REPLIES 3

pcrandom
Contributor

You should be able to use the shell script to define an Extension Attribute. You can then build a Smart Group that uses the EA as a criteria.

mm2270
Legendary Contributor III

Yeah, what you're looking for is an Extension Attribute. Turn your script into one that will populate a value for each Mac which you can then use as criteria for your Smart Group.

ChrisJScott-wor
New Contributor III

Ah, freaking brilliant - thanks!