Created
February 8, 2018 02:28
-
-
Save JLHwung/9671662544df23407301a8f42e93310f to your computer and use it in GitHub Desktop.
Get macOS Installed Application version
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# $1: The application name | |
echo `system_profiler -xml SPApplicationsDataType | xmllint --xpath \ | |
"//dict[string='$1']/key[.='version']/following-sibling::*[1]/text()" -` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment