Skip to content

Instantly share code, notes, and snippets.

@retrography
Created March 9, 2015 15:28
Show Gist options
  • Save retrography/4984e4b2f4b8d6981ce7 to your computer and use it in GitHub Desktop.
Save retrography/4984e4b2f4b8d6981ce7 to your computer and use it in GitHub Desktop.
Detect MacOSX version (only major and minor versions)
sw_vers -productVersion | sed -e "s/^\([0-9]*\)\.\([0-9]*\).*/\1.\2/g"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment