Thursday, January 20, 2022

メモ:現在使っているマックの年齢を調べる

 これでいいらしい:


curl -s https://support-sp.apple.com/sp/product?cc=$(

  system_profiler SPHardwareDataType \

    | awk '/Serial/ {print $4}' \

    | cut -c 9-

) | sed 's|.*<configCode>\(.*\)</configCode>.*|\1|'

echo


ソースはこちら

https://apple.stackexchange.com/questions/98080/can-a-macs-model-year-be-determined-with-a-terminal-command

No comments:

Post a Comment