Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get latest BigFix agent version dynamically (install_bigfix) #9

Open
jgstew opened this issue May 20, 2016 · 2 comments
Open

Get latest BigFix agent version dynamically (install_bigfix) #9

jgstew opened this issue May 20, 2016 · 2 comments

Comments

@jgstew
Copy link
Owner

jgstew commented May 20, 2016

References:

RegEx:
/<td align="left">(?'versions'\d+\.\d+\.\d+\.\d+)<\/td>/g

Command:
cat index.html | grep -m 16 -i -o -P -e '<td align="left">\d+\.\d+\.\d+\.\d+<\/td>' | grep -o -P -e '\d+\.\d+\.\d+\.\d+'

Extended command:
cat index.html | grep -m 16 -i -o -P -e '<td align="left">\d+\.\d+\.\d+\.\d+<\/td>' | grep -o -P -e '\d+\.\d+\.\d+\.\d+' | sort -r -V | uniq -c | grep -m 1 -i "4 " | grep -o -P -e '\d+\.\d+\.\d+\.\d+'

@jgstew jgstew changed the title Get latest BigFix agent version dynamically Get latest BigFix agent version dynamically (install_bigfix) May 20, 2016
@jgstew
Copy link
Owner Author

jgstew commented May 20, 2016

This should get the newest version from any file more generically:
cat file.txt | grep -o -P -e '\d+\.\d+\.\d+\.\d+' | sort -r -V | grep -m 1 '.'

@jgstew
Copy link
Owner Author

jgstew commented May 21, 2016

bigfix_newest_version.sh currently only supports versions in the format 0.0.0.0 but could be adjusted to work with other formats as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant