Last active
January 10, 2023 21:38
-
-
Save petergi/cb2c5384876f28c21fba399db6b793e3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
model=$(system_profiler SPHardwareDataType | awk '/Model Identifier/ { print $3 }') | |
# use grep to find the model in the list, then delete from ) to end of line | |
modelname=`grep $model $DIR/Models.txt | sed -e 's/).*/)/g'` | |
echo $modelname |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment