From owner-freebsd-questions Sun Aug 12 7:52:10 2001 Delivered-To: freebsd-questions@freebsd.org Received: from smtp04.retemail.es (smtp04.iddeo.es [62.81.186.14]) by hub.freebsd.org (Postfix) with ESMTP id 07E0637B403 for ; Sun, 12 Aug 2001 07:52:07 -0700 (PDT) (envelope-from fxn@retemail.es) Received: from retemail.es ([62.174.69.2]) by smtp04.retemail.es (InterMail vM.5.01.03.02 201-253-122-118-102-20010403) with ESMTP id <20010812145204.ETZJ5821.smtp04.retemail.es@retemail.es> for ; Sun, 12 Aug 2001 16:52:04 +0200 Message-ID: <3B769827.2D8B57CB@retemail.es> Date: Sun, 12 Aug 2001 16:52:23 +0200 From: "F. Xavier Noria" X-Mailer: Mozilla 4.76 [en] (X11; U; FreeBSD 4.3-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-questions@FreeBSD.ORG Subject: Re: pkg_info References: <20010812143014.37016.qmail@web13404.mail.yahoo.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Tommy Hallgren wrote: > I'm trying to make pkg_info output only the package names without anything > more. And I fail. > I want a list like this: > Mesa-3.4.1 > ORBit-0.5.7 > XFree86-4.0.3 > aalib-1.2_2 > > Does anyone know? In sh you can get it like this: $ pkg_info | while read pkg rest; do echo $pkg; done This uses cut(1): $ pkg_info | cut -f 1 -d' ' -- fxn To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message