Last active
May 5, 2024 09:10
-
-
Save yazanmonshed/18150da0b795a1f44197191a8f57d625 to your computer and use it in GitHub Desktop.
check the installed package on system (Debian Based OS)
This file contains 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 | |
# Pass the package name | |
package=$1 | |
# Check if the package is installed on system () | |
if dpkg -s $package > /dev/null 2>&1; then | |
echo "$package is installed." | |
else | |
echo "$package is not installed." | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment