Skip to main content
Solved

PrinterLogic Version Extension Attribute - Version file has no extension


Forum|alt.badge.img+12

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?

Best answer by m_donovan

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 original
Did this topic help you find an answer to your question?

2 replies

Forum|alt.badge.img+16
  • Valued Contributor
  • 277 replies
  • March 8, 2018

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


Forum|alt.badge.img+10
  • Valued Contributor
  • 193 replies
  • Answer
  • March 8, 2018

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

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