Created
October 16, 2013 08:44
-
-
Save dschneider/7004637 to your computer and use it in GitHub Desktop.
Determine whether a package is installed or not in a shell script
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
if dpkg-query -W mysql-client &> /dev/null; then | |
echo "INSTALLED" | |
else | |
echo "NOT INSTALLED" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment