From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([69.77.167.62] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1L5GiW-0002We-Np for garchives@archives.gentoo.org; Wed, 26 Nov 2008 09:29:52 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 01037E08C2; Wed, 26 Nov 2008 09:29:43 +0000 (UTC) Received: from mail.oversi.com (oversrv1.oversi.com [209.88.189.2]) by pigeon.gentoo.org (Postfix) with ESMTP id BA898E08C2 for ; Wed, 26 Nov 2008 09:29:42 +0000 (UTC) Received: from [10.2.2.28] (unknown [10.2.2.28]) by mail.oversi.com (Postfix) with ESMTP id BD0E84C5A10 for ; Wed, 26 Nov 2008 11:27:23 +0200 (IST) Message-ID: <492D1705.4050008@oversi.com> Date: Wed, 26 Nov 2008 11:29:41 +0200 From: Amit Dor-Shifer User-Agent: Thunderbird 2.0.0.14 (X11/20080519) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org MIME-Version: 1.0 To: gentoo-portage-dev@lists.gentoo.org Subject: Re: [gentoo-portage-dev] How to extract the version/revision of an installed package? References: <492C2241.8090306@oversi.com> <1227658509.18783.81.camel@hangover> In-Reply-To: <1227658509.18783.81.camel@hangover> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Archives-Salt: 28cc0624-58f5-43b1-8d3e-952ab014e30e X-Archives-Hash: ebdc9808d63a54047de25c2944b4d1cf Great! the usage of -C escaped me, and I was wondering why I was getting bad output... Thanks, Amit Ned Ludd wrote: > On Tue, 2008-11-25 at 18:05 +0200, Amit Dor-Shifer wrote: > >> Given the following: >> # qlist -Iv sys-apps/portage >> sys-apps/portage-2.1.4.5 >> >> How do I safely extract the "2.1.4.5"? >> >> (I don't necessarily need to use qlist. Just want to get the version of >> an installed package within a bash script) >> >> > > > qatom $(qlist -ICv sys-apps/portage) | awk '{print $3}' > > > >