Created
January 27, 2014 15:52
-
-
Save chefe/0d5b5ab944e197784923 to your computer and use it in GitHub Desktop.
Do something in a shell script based on the os type
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
if [ "$(uname)" == "Darwin" ]; then | |
# Do something under Mac OS X platform | |
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then | |
# Do something under Linux platform | |
elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW32_NT" ]; then | |
# Do something under Windows NT platform | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment