Skip to content

Instantly share code, notes, and snippets.

@mattbell87
Created May 3, 2021 00:09
Show Gist options
  • Select an option

  • Save mattbell87/b2b3427942b5fcde47c41f0aa4146738 to your computer and use it in GitHub Desktop.

Select an option

Save mattbell87/b2b3427942b5fcde47c41f0aa4146738 to your computer and use it in GitHub Desktop.
Check if a cli app is installed
#!/bin/bash
isInstalled()
{
command -v "$1" >/dev/null 2>&1
}
if isInstalled $1; then
echo "YES"
else
echo "NO"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment