PrinterLogic Version Extension Attribute - Version file has no extension

UESCDurandal
Contributor II

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?06db4e5d624a4c6dac6ce66d61cccbca
290fc0254a224a02a7c98a16d0d89b6a
4fa51be653874f5884462139943f5984

1 ACCEPTED SOLUTION

m_donovan
Contributor III

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

View solution in original post

2 REPLIES 2

bvrooman
Valued Contributor

Would cat /opt/PrinterInstallerClient/VERSION get you what you want?

m_donovan
Contributor III

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