#!/usr/bin/env bash updates=() if [[ -f /etc/debian_version ]]; then sudo apt update >/dev/null updates+=("[ APT: $(sudo apt list --upgradable | tr -d '\n' | wc -l) ]") fi if [[ -f /etc/redhat-release ]]; then updates+=("[ DNF: $(sudo dnf check-update | wc -l) ]") fi if command -v flatpak >/dev/null; then updates+=("[ Flatpak: $(flatpak remote-ls --updates | wc -l) ]") fi echo "${updates[*]}"