[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

How to check that if a package is installed?



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!


Reply to: