Skip to content

Instantly share code, notes, and snippets.

@johan
Created March 3, 2017 01:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johan/7f196da07fee22b08d6b9d56c1aed573 to your computer and use it in GitHub Desktop.
Save johan/7f196da07fee22b08d6b9d56c1aed573 to your computer and use it in GitHub Desktop.
mac-specs
#! /bin/sh
# runs on any mac, gives its apple specs
curl -is https://support.apple.com/en-us/HT201300 \
| grep -B 1 $( system_profiler SPHardwareDataType -detailLevel mini \
| awk '/Model Identifier/ { print $3 }' \
) \
| egrep -o '<a href=.*</a>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment