From owner-freebsd-ports@freebsd.org Fri Apr 8 13:29:39 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 0E02FB08EB7 for ; Fri, 8 Apr 2016 13:29:39 +0000 (UTC) (envelope-from marquis@roble.com) Received: from mx5.roble.com (mx5.roble.com [206.40.34.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx5.roble.com", Issuer "mx5.roble.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 0583F1655 for ; Fri, 8 Apr 2016 13:29:38 +0000 (UTC) (envelope-from marquis@roble.com) Date: Fri, 8 Apr 2016 06:29:31 -0700 (PDT) From: Roger Marquis 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> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed 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:29:39 -0000 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