autoconf
[Top][All Lists]
Advanced

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

Re: Why if test "xSTRING1= "xSTRING2" (the 'x') ?


From: Eric Blake
Subject: Re: Why if test "xSTRING1= "xSTRING2" (the 'x') ?
Date: Mon, 26 Mar 2007 07:18:48 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.10) Gecko/20070221 Thunderbird/1.5.0.10 Mnenhy/0.7.4.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Jules Colding on 3/26/2007 7:10 AM:
> if test "xSTRING1" = "xSTRING2"; then 
> else
> fi
> 
> Probably something entirely fundamental that I just forgot...

Portability.  Suppose STRING1 is '(' and STRING2 is ')'.  Then 'test "x("
= "x)"' is false, while 'test ( = )' is true.  See also the manual:
http://www.gnu.org/software/autoconf/manual/html_node/Limitations-of-Builtins.html#Limitations-of-Builtins

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGB8g484KuGfSFAYARAlu/AKCtH7LJkY0Rz8G33uSSNb350mxxaQCdHUyK
LsrpLp8EmxMzCYqH4os2Vok=
=MiRM
-----END PGP SIGNATURE-----




reply via email to

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