On 22 Jan 2004 13:06:35 +0000
"Neil Bothwick" <[EMAIL PROTECTED]> wrote:

> Barry Marler said, 
> 
> >> What is the quickest (or preferred) way of checking (in a
> >> bash script) if a given package is installed?
> 
> > 2. qpkg -I <package name>
> 
> qpkg returns zero whether the package is installed or not.
> 
> You could use something like
> 
>     if [ `qpkg -I packagename | wc -l` -gt 0 ]; then
>         echo "installed"
>     else
>         echo "not installed"
>         fi

I assumed the original poster, having expressed a desire for a bash script, needed 
only the tool to return installed packages, which could be used as per your example.


-- 
Barry Marler
Information Analyst II
Center for Applied Genetic Technologies
University of Georgia
Athens, GA
USA

--
[EMAIL PROTECTED] mailing list

Reply via email to