octave-maintainers
[Top][All Lists]
Advanced

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

Re: UGLY_DEFS for darwin in configure.in


From: Thomas Treichl
Subject: Re: UGLY_DEFS for darwin in configure.in
Date: Wed, 03 Oct 2007 20:22:16 +0200
User-agent: Thunderbird 2.0.0.6 (Macintosh/20070728)

John W. Eaton schrieb:
On  3-Oct-2007, Thomas Treichl wrote:

| With Mac's sed yes, it somehow looks the same and I was not able to fix it | before I've started this thread.

OK, I checked in a patch that I think will fix the problem that was
reported in the other thread.  But I see now that the Mac sed doesn't
seem to handle things like

  sed -n 's/\(THIS\|THAT\)/\1/p' < foo

as the alternation expression is not matching.  It does work if it is
rewritten like this:

  sed -n -E 's/(THIS|THAT)/\1/p' < foo

but how lame is that?  Or am I expecting too much?  What other modern
seds don't support this feature?  Is it required by POSIX?  Should we
try to work around this, or just reject a sed that doesn't work the
way we expect here?  Anyway, I guess this provides a test case we
could use to extend the OCTAVE_PROG_SED test in aclocal.m4.

jwe

My suggestion would be to reject because it really isn't a problem to install a very new GNU's sed on any platform and use this beside any other old sed that is installed (that's my little users point of view). There is also another interesting thing that I've found out when I was trying to check for the problem:

Mac's sed:

  bash$ /usr/bin/sed --version
    sed: illegal option -- -
    usage: sed script [-Ean] [-i extension] [file ...]
      sed [-an] [-i extension] [-e script] ... [-f script_file] ... [file ...]

GNU's sed:

  bash$ /usr/local/bin/sed --version
    GNU sed version 4.1.5
    Copyright (C) 2003 Free Software Foundation, Inc.

So I can't even tell you which version of Mac's sed is shipped with a Mac resp. what differences else do exist here between POSIX and GNU...

  Thomas


reply via email to

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