Skip to content

Instantly share code, notes, and snippets.

@johan johan/mac-specs.sh
Created Mar 3, 2017

Embed
What would you like to do?
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
You can’t perform that action at this time.