I'm looking for a proper way to check if a command does not exist. I've read through Check if a program exists from a Bash script. So far I came up with:
command_exists () {
    command -v $1 >/dev/null 2>&1;
}
if command_exists aws; then
    echo # null
else
    brew install awscli
fi
There has to be a way to only have one if clause like:
if ! command_exists aws; then
    brew install awscli
fi
update: nevermind, above solution works.
 
     
    