Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Apr 2016 06:29:31 -0700 (PDT)
From:      Roger Marquis <marquis@roble.com>
To:        freebsd-ports@freebsd.org
Subject:   Re: Deriving base port/package names
In-Reply-To: <51300.1460083670@server1.tristatelogic.com>
References:  <51300.1460083670@server1.tristatelogic.com>

| previous in thread | raw e-mail | index | archive | help
Ronald F. Guilmette wrote:
> what would be a proper sort of sed command to extract
> _just_ the port/package names, without the version numbers attached?

This has changed in the past so may not currently be 100% correct but
these should work:

   awk -F'-[0-9]' '{ print $1 }'

or:

   sed 's/-[0-9].*$//'

It's a good question in any case and the answer{,s} should probably be
added to pkg(8)'s EXAMPLES.

Roger



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