From owner-freebsd-ports@freebsd.org Fri Apr 8 06:52:54 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 A54EEB09000 for ; Fri, 8 Apr 2016 06:52:54 +0000 (UTC) (envelope-from 000.fbsd@quip.cz) Received: from elsa.codelab.cz (elsa.codelab.cz [94.124.105.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6D95617EA for ; Fri, 8 Apr 2016 06:52:53 +0000 (UTC) (envelope-from 000.fbsd@quip.cz) Received: from elsa.codelab.cz (localhost [127.0.0.1]) by elsa.codelab.cz (Postfix) with ESMTP id A891728429; Fri, 8 Apr 2016 08:52:45 +0200 (CEST) Received: from illbsd.quip.test (ip-86-49-16-209.net.upcbroadband.cz [86.49.16.209]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by elsa.codelab.cz (Postfix) with ESMTPSA id 78FF228422; Fri, 8 Apr 2016 08:52:44 +0200 (CEST) Message-ID: <5707553C.40008@quip.cz> Date: Fri, 08 Apr 2016 08:52:44 +0200 From: Miroslav Lachman <000.fbsd@quip.cz> User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:35.0) Gecko/20100101 Firefox/35.0 SeaMonkey/2.32 MIME-Version: 1.0 To: "Ronald F. Guilmette" , freebsd-ports@freebsd.org Subject: Re: Deriving base port/package names References: <51300.1460083670@server1.tristatelogic.com> In-Reply-To: <51300.1460083670@server1.tristatelogic.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed 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 06:52:54 -0000 Ronald F. Guilmette wrote on 04/08/2016 04:47: > > Given a list of all current FreeBSD ports/package, such as a (plain text > version) the list found here: > > https://www.freebsd.org/ports/master-index.html > > and assuming that all text past the ' -- ' has already been deleted > from each line, what would be a proper sort of sed command to extract > _just_ the port/package names, without the version numbers attached? If your plaintext master-index xontains full lines like this yorick-2.2.04_1 -- Interpreted language for scientific simulations Than you can use this sed line # sed 's/-[0-9a-z.,_+]* --.*$//g' master-index.txt If you have the index stripped to yorick-2.2.04_1 This will do the trick sed 's/-[0-9a-z.,_+]*$//g' master-index.txt Miroslav Lachman