Created
August 4, 2011 16:27
-
-
Save siwells/1125564 to your computer and use it in GitHub Desktop.
Determine the kernel that the host is running & output an appropriate message
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=`uname -s` | |
if [ "$OS" == "Darwin" ]; then | |
echo "Mac OS X with Darwin Kernel" | |
elif [ "$OS" == "Linux" ]; then | |
echo "GNU/Linux OS with Linux Kernel" | |
else | |
echo "Not Mac or Linux" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
!/bin/bash
OS=
uname -s
if [ "$OS" == "Darwin" ]; then
echo "Mac OS X with Darwin Kernel"
elif [ "$OS" == "Linux" ]; then
echo "GNU/Linux OS with Linux Kernel"
else
echo "Not Mac or Linux"
fi