How to check that if a package is installed?

Boggess Rod rboggess at tenovacore.com
Tue Nov 30 18:45:31 UTC 2010


Date: Tue, 30 Nov 2010 09:15:15 -0500
From: Hal Burgiss <hal at burgiss.net>
Subject: Re: How to check that if a package is installed?
To: "Ubuntu user technical support,	not for general discussions"
	<ubuntu-users at lists.ubuntu.com>
Message-ID:
	<AANLkTi=Yy4OcXjto+n=s0hfZYO1Z+=xFPP96mgpUfyUN at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

On Tue, Nov 30, 2010 at 7:54 AM, S Mathias <smathias1972 at yahoo.com>
wrote:

> 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?
>
>
Seems kind of wordy to me for what it really does ...

dpkg -l |grep torfrodos || echo nope


-- 

I wasn't following this thread from the beginning, but is there a reason
we're avoiding the GUI? Why not just look at the installed packages in
synaptic package manager or whatever they replaced it with in the newest
release?




More information about the ubuntu-users mailing list