Skip to content

Instantly share code, notes, and snippets.

@lorentzca
Created August 21, 2015 01:59
Show Gist options
  • Save lorentzca/588cd7c4e52091fb3711 to your computer and use it in GitHub Desktop.
Save lorentzca/588cd7c4e52091fb3711 to your computer and use it in GitHub Desktop.
what is my mac model number?
#!/usr/bin/env ruby
mode_identifier = `system_profiler SPHardwareDataType | awk '/Model Identifier:/ {print $3}'`
`open http://www.everymac.com/ultimate-mac-lookup/?search_keywords=#{mode_identifier}`
@lorentzca
Copy link
Author

Usage

./what_is_my_mac_model_number.rb

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