Skip to content

Instantly share code, notes, and snippets.

@rkaneko
Created August 30, 2014 14:53
Show Gist options
  • Save rkaneko/b9ab8c7afb2d6850e18e to your computer and use it in GitHub Desktop.
Save rkaneko/b9ab8c7afb2d6850e18e to your computer and use it in GitHub Desktop.
See if OS is Mac or not.
#!/bin/bash
if [ `expr "$(sw_vers -productName)" : '.*Mac'` -gt 0 ]; then
echo true
else
echo false
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment