JamfProScripts icon indicating copy to clipboard operation
JamfProScripts copied to clipboard

getJavaVersion has dangling \r

Open brunerd opened this issue 9 years ago • 1 comments

There's a \r at the end of currVersBase from the getJavaVersion, so the compare fails and will bug you in Self Service mode

Added a sed item to to kill \r: -e "s/"$'\r'"//g"

So it is now: currVersBase=$( curl -sfA "${UAGENT}" "${URL}" 2>/dev/null | awk -F'[>|<]' '/Version/{print}' | sed -e 's/Version //;s/ Update /./' -e "s/"$'\r'"//g")

brunerd avatar Mar 25 '15 02:03 brunerd

Hi brunerd.

Thanks. I had seen that extra carriage return myself, and, at one point had fixed it (with a perl snippet, but sed works just as well), but my bad, I forgot to add that update into the script posted here. I'll be sure to update it with the correct code.

I'm working on a new version of the script with more features so a lot of my focus has been on that script, which is probably why I forgot to add it in to this version. At least that's my story and I'm sticking to it :)

mm2270 avatar Apr 04 '15 23:04 mm2270