Deriving base port/package names
Roger Marquis
marquis at roble.com
Fri Apr 8 13:29:39 UTC 2016
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
More information about the freebsd-ports
mailing list