Answer by user2567875 for Script to check if some program is already installed
Why do you want to check it in the first place? Unless you have a good reason for it, don't do it, just apt-get install package over. If it's already installed it will be updated if there is a newer...
View ArticleAnswer by Elder Geek for Script to check if some program is already installed
Here's a function I wrote for the purpose that I use in my scripts. It checks to see if the required package is installed and if not, prompts the user to install it. It requires a package name as a...
View ArticleAnswer by George Udosen for Script to check if some program is already installed
This line of command will check using the which program and will return 0 if installed and 1 if not: which apache | grep -o apache > /dev/null && echo 0 || echo 1 Of course you will use it...
View ArticleAnswer by Hossein for Script to check if some program is already installed
you can do this: dpkg -s <packagename> &> /dev/null then check exit status.only if the exit status of the above command was equal to 0 then the package installed. so: #!/bin/bash echo...
View ArticleAnswer by user535733 for Script to check if some program is already installed
One easy way to check for installed packages using apt-mark: apt-mark showinstall will list all packages marked install (already installed, or queued for installation). After that, it's a simple matter...
View ArticleScript to check if some program is already installed
How can I create a bash script that checks if a program is already installed, and if it isn't, installs it? Thanks for your help. Here's the code I have so far: #/bin/bash PS3="choose an option"...
View Article