From owner-freebsd-ports@freebsd.org Fri Apr 8 13:50:03 2016 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 47875B086EC for ; Fri, 8 Apr 2016 13:50:03 +0000 (UTC) (envelope-from rwmaillists@googlemail.com) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 28053133B for ; Fri, 8 Apr 2016 13:50:03 +0000 (UTC) (envelope-from rwmaillists@googlemail.com) Received: by mailman.ysv.freebsd.org (Postfix) id 23FE1B086EB; Fri, 8 Apr 2016 13:50:03 +0000 (UTC) Delivered-To: ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 21746B086EA for ; Fri, 8 Apr 2016 13:50:03 +0000 (UTC) (envelope-from rwmaillists@googlemail.com) Received: from mail-wm0-x241.google.com (mail-wm0-x241.google.com [IPv6:2a00:1450:400c:c09::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A35EB133A for ; Fri, 8 Apr 2016 13:50:02 +0000 (UTC) (envelope-from rwmaillists@googlemail.com) Received: by mail-wm0-x241.google.com with SMTP id a140so4513361wma.2 for ; Fri, 08 Apr 2016 06:50:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=date:from:to:subject:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=KWEmX512gs21mLFOiptLupd5dUyP9zx4D3TCtosE8tA=; b=tBkS1a11nT0ChajW0crEz81Jxn2xbAA7NsOITkJaAvvwiHZjDiEUK+WEyVvV3mEUI1 Bh1VWVgPbx4HN0AU+bVn7i/NIE2/1aKJ1ckhs0+dl2dh5A261jhvRdv0r1bNwvvrwpF/ 24kHuexGWwmlKSgdGC/8P7Qyzpnswkk770cpLZTXFi0hDU53ALh9quGxyo2MNQdc3Zvp 1RrlZ7QyS89BMaZVfA9nMpqUs27SkjOxZRUa89DsK4CwLDNzbpVNbkSopFs9tPNIzwZp 4S+bVqiFB+5SGMGJ482fw7iSnR5PUirh2cA/Mx94D3v72FKC0lEhfpbYNmk+XfdCcXvy O9+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KWEmX512gs21mLFOiptLupd5dUyP9zx4D3TCtosE8tA=; b=Eu8FXN8F9U1zdXBjrVBBsl0PtIKYFrbqTHXaDvGeIFrSZOX9VX6zmrZ2PEDC5Oqqm7 S4MQ7zgiCU0WQD4eHSyT44UJdoPUVY6K4ESAHWPCtzYy5wjXBHTmGwhKJMqK6vpjFzpB YQaEpMUQ3/addJ0EWtZ4/9kY6p5MVYDIP4YDFc26JQn799MAeEza0k+hxreDIcqgjNur YYrZk/PpOanu2DIbctJtw9yRmBTHU8zhIspmdTM5zMStBPMaoUyM3494vq7adgr9lNnn KzWeRZERr9wYZL41DINe7MumVi+Vuj1vHcp4rMrVesb16dKPJ10AP9Zle1S4NXACjw16 rkYw== X-Gm-Message-State: AD7BkJKXVUWBvG8hRwtbQXeaUKhpjeJFG76a+aXyha/ULjxWmd4sWbKz4FfRU2txC/IriA== X-Received: by 10.28.73.66 with SMTP id w63mr4085904wma.53.1460123401079; Fri, 08 Apr 2016 06:50:01 -0700 (PDT) Received: from gumby.homeunix.com ([90.195.213.233]) by smtp.gmail.com with ESMTPSA id u145sm3146724wmu.17.2016.04.08.06.49.58 for (version=TLSv1/SSLv3 cipher=OTHER); Fri, 08 Apr 2016 06:49:59 -0700 (PDT) Date: Fri, 8 Apr 2016 14:49:57 +0100 From: RW 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> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.29; amd64-portbld-freebsd10.2) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Apr 2016 13:50:03 -0000 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.