Created
July 10, 2023 09:07
-
-
Save jvarn/b42ee3d1db7c03d25a185e2415f9ab1d to your computer and use it in GitHub Desktop.
Quick search for installed dpkg, flatpak, snap packages
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
BoldGreen='\033[1;32m' | |
NoColour='\033[0m' | |
## Parameter specified? | |
if [ $# -eq 0 ]; then | |
echo -e "No package specified" | |
exit 1 | |
fi | |
package="$1" | |
printf "${BoldGreen}\nAPT\n${NoColour}" | |
dpkg -l | grep ${package} || echo "none" | |
printf "${BoldGreen}\nFLATPAK\n${NoColour}" | |
flatpak list | grep ${package} || echo "none" | |
printf "${BoldGreen}\nSNAP\n${NoColour}" | |
snap list | grep ${package} || echo "none" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment