From owner-freebsd-current@freebsd.org Wed Jun 7 08:54:26 2017 Return-Path: Delivered-To: freebsd-current@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 8593DBFEFC7 for ; Wed, 7 Jun 2017 08:54:26 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from smtp.digiware.nl (smtp.digiware.nl [IPv6:2001:4cb8:90:ffff::3]) (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 4C5DF67A5C for ; Wed, 7 Jun 2017 08:54:26 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from router.digiware.nl (localhost.digiware.nl [127.0.0.1]) by smtp.digiware.nl (Postfix) with ESMTP id F2A6C42ED1; Wed, 7 Jun 2017 10:54:21 +0200 (CEST) X-Virus-Scanned: amavisd-new at digiware.com Received: from smtp.digiware.nl ([127.0.0.1]) by router.digiware.nl (router.digiware.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EVZ7y67VZbwP; Wed, 7 Jun 2017 10:54:21 +0200 (CEST) Received: from [192.168.11.152] (unknown [192.168.11.152]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.digiware.nl (Postfix) with ESMTPSA id 37B4942ED0; Wed, 7 Jun 2017 10:54:21 +0200 (CEST) Subject: Re: [sed] command failure? Porting a project to FreeBSD To: blubee blubeeme , Jov Cc: FreeBSD current References: From: Willem Jan Withagen Message-ID: Date: Wed, 7 Jun 2017 10:54:23 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: nl Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jun 2017 08:54:26 -0000 On 07/06/2017 09:40, blubee blubeeme wrote: > Ahhh, that was it. Doing a find and ask to replace all instances of sed > with gsed passed that part. > > By the way, is knowledge like this written down somewhere centralized or is > it just floating in the ether? >From my experience of porting Ceph.... (And I agree with HPS, that if it looks a like, it does not have to be the same.) Most of these thing you have to find out on your own. But that is also the fun of porting: issue arise from the strangest of corners. Regular expression are among the most notorious, some of the Linux tools also use Perl REs. Something the basic FreeeBSD will not do, since it requires pulling Perl into base. So for most of the tools, there is also a GNU equivalent, so that is usually the first thing to look at. Even more tricky are the tools you can install, but hat the same name as their base counterpart. Like getopt, where the packaged one understands a completely different set of options. Not sure if you will be running into bash, but that ends up in /usr/local/bin, whilest just about every script expects /bin/sh to be bash. Even things like /usr/bin/env do not work the same way, and or have the same parameters. So even there it does not always help. --WjW