From owner-freebsd-ports@freebsd.org Fri Apr 8 17:49:09 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 78126B07671 for ; Fri, 8 Apr 2016 17:49:09 +0000 (UTC) (envelope-from rfg@tristatelogic.com) Received: from outgoing.tristatelogic.com (segfault.tristatelogic.com [69.62.255.118]) by mx1.freebsd.org (Postfix) with ESMTP id 6752F177C for ; Fri, 8 Apr 2016 17:49:08 +0000 (UTC) (envelope-from rfg@tristatelogic.com) Received: from segfault-nmh-helo.tristatelogic.com (localhost [127.0.0.1]) by segfault.tristatelogic.com (Postfix) with ESMTP id 6080F3AEF8 for ; Fri, 8 Apr 2016 10:49:07 -0700 (PDT) From: "Ronald F. Guilmette" To: freebsd-ports@freebsd.org Subject: Re: Deriving base port/package names In-Reply-To: <5707553C.40008@quip.cz> Date: Fri, 08 Apr 2016 10:49:07 -0700 Message-ID: <54889.1460137747@server1.tristatelogic.com> 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 17:49:09 -0000 In message <5707553C.40008@quip.cz>, Miroslav Lachman <000.fbsd@quip.cz> wrote: >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 Thank you. Your response made me realize that there's an even simpler solution... sed 's/-[^\-]*$//' That seems to do the trick!