I\'m working on a Ubuntu system and currently this is what I\'m doing:
if ! which command > /dev/null; then echo -e \"Command not found! Install? (y/n)
apt list [packagename]
seems to be the simplest way to do it outside of dpkg and older apt-* tools