How to check that if a package is installed?

S Mathias smathias1972 at yahoo.com
Tue Nov 30 12:54:34 UTC 2010


if [ "$(dpkg -l | awk '/tofrodos/ && /^ii/ {print $2}' | awk 
'/^tofrodos/')" == "" ]; then echo -e "error: no zip package 
detected\!\n\nYou could install it like e.g.: \"apt-get install 
tofrodos\""; fi









Is there a better way then this?



Thank you!




      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20101130/e44501dd/attachment.html>


More information about the ubuntu-users mailing list