Replies: 1 comment
-
function is_apt_package_installed() {
local package="$1"
apt list --quiet --quiet --installed "${package}" 2>/dev/null | grep --quiet .
}
if is_apt_package_installed curl; then
echo "curl is installed"
else
echo "curl is not installed"
fi |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
felipecrs
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Title says all.
Beta Was this translation helpful? Give feedback.
All reactions