Created
May 9, 2019 10:42
-
-
Save chenwaichung/6701f6ecc11fdf5a9f0a13201969723a to your computer and use it in GitHub Desktop.
use dpkg-query check package is installed?
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 | |
pkgs=automake | |
if dpkg-query -l ${pkgs} >/dev/null 2>&1; then | |
echo "${pkgs} is installed." | |
else | |
echo "${pkgs} not installed." | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment