Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Aug 2001 16:52:23 +0200
From:      "F. Xavier Noria" <fxn@retemail.es>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Re: pkg_info
Message-ID:  <3B769827.2D8B57CB@retemail.es>
References:  <20010812143014.37016.qmail@web13404.mail.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Tommy Hallgren wrote:

> I'm trying to make pkg_info output only the package names without anything
> more. And I fail.

<snip>

> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3B769827.2D8B57CB>