Check if command exists with shell script

if ! type gem > /dev/null; then
  echo 'gem command not found.'
fi


Tino

Get our stories delivered

From us to your inbox weekly.