OS Specific Bash Aliases Or Configs Using Conditions
Posted by Weston Ganger
I usually keep all of my dotfiles in a repo and share them across all of my machine. So when I had a couple of Bash alias’ that were not working and environment variables that were different on my Macbook it was becoming a bit annoying.
So I started using OS conditionals inside my
if [[ $(echo $OSTYPE) == "linux-gnu" ]]; then # Linux elif [[ $(echo $OSTYPE) == "darwin"* ]]; then # Mac OSX fi
Related External Links: