Skip to main content
Solved

cUrl Version via Exentension Attribute Not Reporting Back in Jamf


Forum|alt.badge.img+6

I have tried writing a script about four different ways simply to report what version cURL is installed on Macs. I am scratching my head why the value is blank after running recon on various Macs.  Below is the script:

#!/bin/bash if command -v curl >/dev/null 2>&1; then curl_version=$(curl --version | awk 'NR==1{print $2}') echo "cURL is installed. Version: $curl_version" else echo "cURL is not installed." fi

Best answer by shannon_pasto

you have to echo your response inside 

 

<result></result>

 

 So your 2 echo lines will be

 

echo "<result>cURL is installed. Version: $curl_version</result>"

 

and

 

echo "<result>cURL is not installed.</result>"

 

 

View original
Did this topic help you find an answer to your question?

3 replies

Forum|alt.badge.img+8
  • Contributor
  • 96 replies
  • Answer
  • October 12, 2023

you have to echo your response inside 

 

<result></result>

 

 So your 2 echo lines will be

 

echo "<result>cURL is installed. Version: $curl_version</result>"

 

and

 

echo "<result>cURL is not installed.</result>"

 

 


Forum|alt.badge.img+6
  • Author
  • Contributor
  • 19 replies
  • October 12, 2023

Thank You!!!!


Tonyyoung
Forum|alt.badge.img+7
  • Contributor
  • 33 replies
  • October 12, 2023

I do believe that’s only going to check for the Apple installed curl, and won’t account for third party (homebrew, manually from GitHub, etc) versions of curl. Just keep that in mind. 


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