Skip to content

Instantly share code, notes, and snippets.

@bjorand
Created December 20, 2016 16:17
Show Gist options
  • Save bjorand/e379e310aa7c260513e6452684026736 to your computer and use it in GitHub Desktop.
Save bjorand/e379e310aa7c260513e6452684026736 to your computer and use it in GitHub Desktop.
Helper for Detecting OS with bash
OS="$(uname -s)"
case $OS in
"Darwin")
echo dar
;;
"Linux")
echo lin
;;
*)
echo "Unsupported OS"
exit 1
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment