Created
November 6, 2012 07:36
-
-
Save jiskanulo/4023269 to your computer and use it in GitHub Desktop.
Mac OS Xか否か判別
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 | |
os_x="" | |
if [ -x `which sw_vers` ]; then | |
os_x="${sw_vers} | grep 'Mac OS X'" | |
fi | |
if [ -n "$os_x" ]; then | |
echo "Mac OS X" | |
else | |
echo "Other" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment