Skip to main content

I am trying to make a smart group to see what computers have the PaperCut Client installed but i don’t see anything in the /Applications/PaperCut Print Deploy Client/ directory that i can select as the .app in the smart group. 

What can I use create this smart group?

 

 

 

@mickgrant 

@agungsujiwo 

The log file looks to hold the papercut client version but then the script has to check the most recent data because the log holds a bunch of previous papercut client versions.  The log has a bunch of dates that has the version at the time the log had data added to it. 

See the attached picture. Bottom right hand corner looks.to be where Papercut displays the papercut client version. 

 

Hi ​@tcandela 

Here is a script to find the latest running version.

#!/bin/bash
# Create by Agung Sujiwo
# Path ke log file PaperCut
LOGFILE="/Applications/PaperCut Print Deploy Client/data/logs/pc-print-deploy-client.log"

if r -f "$LOGFILE" ]]; then
# Retrieve the latest line based on the date (the timestamp at the beginning of the log: YYYY/MM/DD ...)
LAST_LINE=$(grep "PaperCut Print Deploy Client running on version" "$LOGFILE" | sort | tail -1)

# Search for the version pattern (number format x.x.x)
VERSION=$(echo "$LAST_LINE" | grep -oE " 0-9]+\.-0-9]+\.90-9]+")
else
VERSION="Not Found"
fi

# Output ke Jamf Extension Attribute
echo "<result>$VERSION</result>"

 


@agungsujiwo exactly, the log file has the client version each time the log file gets information added to it. So if the log file ran 2 weeks ago and again today the Papercut client t version would probably  be different.  I'll use your script and let you know the results. Thanks