Gentoo Archives: gentoo-user

From: Helmut Jarausch <jarausch@××××××××××××××××.de>
To: gentoo-user@l.g.o
Subject: [gentoo-user] script to check if a package is installed ?
Date: Fri, 12 Feb 2010 09:16:41
Message-Id: tkrat.62711d6682cad050@igpm.rwth-aachen.de
1 Hi,
2
3 does anybody know how to check if a package is installed using a script/
4 shell.
5
6 Unfortunately eix -I -q CAT/PACK
7 produces a return code of 0 irrespectively if CAT/PACK
8 is install or not.
9
10 I'd like to say
11
12 for P in .......; do
13 if CHECK_IF_INSTALLED $P; then echo $P; fi
14 done
15
16 What to replace for CHECK_IF_INSTALLED ?
17
18 Many thanks for a hint,
19 Helmut.
20
21 --
22 Helmut Jarausch
23
24 Lehrstuhl fuer Numerische Mathematik
25 RWTH - Aachen University
26 D 52056 Aachen, Germany

Replies

Subject Author
Re: [gentoo-user] script to check if a package is installed ? Alan McKinnon <alan.mckinnon@×××××.com>