autoconf
[Top][All Lists]
Advanced

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

[Autoconf] Re: Autoupdate test failing on Solaris7


From: Alexandre Oliva
Subject: [Autoconf] Re: Autoupdate test failing on Solaris7
Date: 13 Sep 2000 19:37:51 -0300
User-agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands)

On Sep 13, 2000, Bernard Dautrevaux <address@hidden> wrote:

> $ echo `expr "-" : '-[^=]*=\(.*\)'`
> expr: syntax error

> However the patch sent correct this anyway :-)

Nope, `echo' is also subject to `-' problems.

The right fix is one of:

option=`expr "x$1" : 'x-[^=]=\(.*\)'`

or

option=`echo "x$1" | sed -e '1s/^x//' -e 's/^-[^=]*=//'`

The former is slightly better in handling of backslashes, but the
second wouldn't fail for command-line arguments that are too long,
when using implementations of `expr' that fail if the matched string
is longer 128 bytes or longer.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  address@hidden, redhat.com}
CS PhD student at IC-Unicamp        address@hidden, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me


reply via email to

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