|
From: | Rik |
Subject: | Re: sed vs. gsed |
Date: | Mon, 19 Sep 2016 16:29:46 -0700 |
On 09/19/2016 04:05 PM,
address@hidden wrote:
Mike, The autoconf documentation is useful here. In configure.ac we use AC_PROG_AWK (https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Particular-Programs.html). According to the documentation, — Macro: AC_PROG_AWK
For sed, we do not use AC_PROG_SED, but instead wrote our own
macro OCTAVE_PROG_SED which is in m4/acinclude.m4. The top of
this macro has dnl Clearly, we are already trying to test for a sed which supports
alternation and for some reason it is failing? Also, if you check the Limitation of Usual Tools link, you will
find: "Portable sed regular expressions should use ‘\’ only to escape
characters in the string ‘$()*.0123456789[\^n{}’. For example,
alternation, ‘\|’, is common but Posix does not require its
support, so it should be avoided in portable scripts. Solaris sed
does not support alternation; e.g., ‘sed '/a\|b/d'’ deletes only
lines that contain the literal string ‘a|b’. Similarly, ‘\+’ and
‘\?’ should be avoided." This is a known problem. Either we have to write all of our sed
scripts in a manner that might be accepted by a Cray computer from
1960, or we require a more modern sed, preferably gsed. --Rik |
[Prev in Thread] | Current Thread | [Next in Thread] |