Posted on 03-08-2018 10:55 AM
I'm trying to set up an extension attribute to capture the version of the Printer Logic Client. The only location I can find the version is within a file that has no extension located within this folder, 'opt/PrinterInstallerClient/' titled 'VERSION'
My attempts to simply read the contents are not succeeding given the lack of a file extension by default. I might be missing something simple, but does anyone have any thoughts on how I might be able to script this extension attribute?
Solved! Go to Solution.
Posted on 03-08-2018 11:25 AM
This is what we are using.
#!/bin/bash
PrinterInstallerInfo=$(cat /opt/PrinterInstallerClient/VERSION)
if [ ! -z "$PrinterInstallerInfo" ] ; then
echo "<result>$PrinterInstallerInfo</result>"
else
echo "<result>not found</result>"
fi
exit 0
Posted on 03-08-2018 11:20 AM
Would cat /opt/PrinterInstallerClient/VERSION
get you what you want?
Posted on 03-08-2018 11:25 AM
This is what we are using.
#!/bin/bash
PrinterInstallerInfo=$(cat /opt/PrinterInstallerClient/VERSION)
if [ ! -z "$PrinterInstallerInfo" ] ; then
echo "<result>$PrinterInstallerInfo</result>"
else
echo "<result>not found</result>"
fi
exit 0