Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
## ::::::::::::::::::::::::::::::::::::::::::::::::::::::::
##
PKG="nano";
# read -p "ENTER name install PKG: " insPKG;
if [ "$(dpkg-query -W -f='${Status}' "$PKG" 2>/dev/null | grep -c "ok installed")" == "1" ]; then
echo "$PKG OK"
else
apt update -q4;
apt -y install "$PKG";
fi;
## ::::::::::::::::::::::::::::::::::::::::::::::::::::::::
##
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment