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