![]() You can get the list using this: (echo "" curl -sfLS "" \ Update (over a year later)Īpple now maintains a web page with all of the names and corresponding numbers: I’ll leave the question open in case we do find a solution that doesn’t require an external script. ![]() So I made an alternative to Marc Wilson’s idea (above) and created a shell script which can either output a full list of all of the version numbers and their “friendly names” or will allow you to search for a specific name, for example, if you just want to know which version was called “Yosemite”. ![]() Well, I finally gave up looking for a solution - maybe we'll find one after Mojave hits its final release, but it obviously won't be something that it easily used on older versions of Mac OS X / OS X / macOS. To see the full XML response, simply omit the -xpath "//root/configCode/text()" option: curl -s $( sw_vers -productVersion ) | xmllint -format. This command will query Apple's server with your poduct version and will extract the OS name from the XML response. You can also do this online (which is actually what populates "About this Mac" dialog shown in the question): curl -s $( sw_vers -productVersion ) | xmllint -format -xpath "//root/configCode/text()". It's tested to work in High Sierra and should work in Mojave. ![]() This command should find what you're looking for: awk '/SOFTWARE LICENSE AGREEMENT FOR macOS/' '/System/Library/CoreServices/Setup Assistant.app/Contents/Resources/en.lproj/OSXSoftwareLicense.rtf' | awk -F 'macOS ' ''
0 Comments
Leave a Reply. |