octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SED and sed vs gsed


From: c.
Subject: Re: SED and sed vs gsed
Date: Mon, 19 Sep 2016 17:18:24 +0200

On 18 Sep 2016, at 19:44, Mike Miller <address@hidden> wrote:

> All,
> 
> I've noticed some problems with Octave's build when the sed program
> found by configure is *not* GNU sed (e.g. on macOS, *BSD, or Solaris
> systems). Thanks to Carlo for repeatedly pointing this out and for
> setting up the buildbot process which can show this repeatably.
> 
> How portable do we care to be? Should we try to make our build work with
> any sed program, or should we improve configure to look for and require
> GNU sed without the user needing to set SED=gsed in the environment?
> 
> For example we use the following syntaxes in several places, all of
> which are not portable to non-GNU sed:
> 
>  \+
>  \?
>  \|
> 
> We could replace 'a\+' with 'aa*'. We could replace 'a\?' with
> 'a\{0,1\}' (exact) or 'a*' (probably close enough). I'm not aware of a
> basic RE equivalent for alternation 'a\|b'. This happens to be the one
> of these three that we use the most (mk-builtins.sh, mk-f77-def.sh,
> mk-octave-config-h.sh).
> 
> -- 
> mike


Hi Mike,

As you pointed out on the bug tracker discussion 
   
  https://savannah.gnu.org/bugs/index.php?49126

the same issue is there also in relation to awk/gawk.

I also wonder whether using only one of awk/sed would
reduce the burden of maintainance and the number of
possible sources of portability problems ...

c.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]