Skip to main content
Question

using shell script output as a paramter for smart group


Forum|alt.badge.img+4

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

Forum|alt.badge.img+7
  • Contributor
  • 90 replies
  • November 2, 2016

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
Forum|alt.badge.img+16
  • Legendary Contributor
  • 7880 replies
  • November 2, 2016

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.


Forum|alt.badge.img+4

Ah, freaking brilliant - thanks!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings