lkml.org 
[lkml]   [2007]   [Oct]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [patch 2.6.23-git] toplevel Makefile/depmod bugfix
From
Date
 > Accoding to man bash "==" is used to test for equality and "=" is used for assignmnet.
> I assume the above is a dash syntax error (dash is default on ubuntu IIRC).

My bash man page says the following under "CONDITIONAL EXPRESSIONS":

string1 == string2
True if the strings are equal. = may be used in place
of == for strict POSIX compliance.

This is bash 3.1 as packaged by Debian.

So I think "=" is the correct thing to use for compatibility with dash
or other non-bash shells, since as far as I know, there are no
situations where a comparison with "=" will fail but "==" will succed.
(ie "=" is strictly more compatible).

- R.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-10-20 07:47    [W:0.421 / U:1.848 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site