Created
September 27, 2016 12:54
-
-
Save luiscoms/cab5da724e6e0747a23324283f7dc9f3 to your computer and use it in GitHub Desktop.
Bash script to detect OS by type
This file contains hidden or 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 -x | |
| case "$OSTYPE" in | |
| darwin*) echo "I am a Mac" ;; | |
| *) echo "I am not a Mac" ;; | |
| esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment