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

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

 



-----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             ebb9@xxxxxxx
-----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-----


_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux