Last active
October 6, 2021 16:08
-
-
Save ww898/f146a1c384109c508ffbc6b5f0865ad9 to your computer and use it in GitHub Desktop.
Get macOS version
This file contains 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
#!/usr/bin/env osascript -l JavaScript | |
values = ObjC.deepUnwrap($.NSProcessInfo.processInfo.operatingSystemVersion) | |
for (name in values) { | |
console.log(name, values[name]) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Run with
SYSTEM_VERSION_COMPAT=1
for compatibility mode under macOS Big Sur and Monterey.