dpkg -s can be used.
Example: is vlc installed?
Here is some logic in bash script, like installing package if it is not there:
Aim: Good Articles in simple Language. {Source Of Highly Innovative Value Added Mania}
> dpkg -s vlc|grep installed
1 2 3 4 5 6 | problem=$(dpkg -s vlc|grep installed) echo Checking for libxul: $problem if [ "" == "$problem" ]; then echo "No libxul. Setting up libxul" sudo apt-get --force-yes --yes install vlc fi |
No comments:
Post a Comment