Date: Fri, 8 Apr 2016 14:49:57 +0100 From: RW <rwmaillists@googlemail.com> To: ports@freebsd.org Subject: Re: Deriving base port/package names Message-ID: <20160408144957.26ad363f@gumby.homeunix.com> In-Reply-To: <5707b24b.9143620a.1a679.ffffbb00SMTPIN_ADDED_MISSING@mx.google.com> References: <51300.1460083670@server1.tristatelogic.com> <5707b24b.9143620a.1a679.ffffbb00SMTPIN_ADDED_MISSING@mx.google.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 8 Apr 2016 06:29:31 -0700 (PDT) Roger Marquis wrote: > 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].*$//' A port name can contain digits and hyphens, so this could remove part of the name. Miroslav's version is better because it requires that the part that's stripped only has a hyphen as it's first character.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160408144957.26ad363f>