Sprawdź, czy istnieje polecenie

# To find out if a given command exists:

if command -v given-command > /dev/null 2>&1; then
  echo given-command is available
else
  echo given-command is not available
fi
Foolish Finch