Stupid bash question

Ralf Corsepius rc040203 at freenet.de
Tue Dec 11 15:45:24 UTC 2007


On Tue, 2007-12-11 at 09:30 -0600, Aaron Konstam wrote:
> On Mon, 2007-12-10 at 15:48 -0700, Paul Lemmons wrote:

> > > Okay, I'm confused.  How would bash interpret this line?
> > > 
> > > [ "`isthislinux`" = "LINUX" ] && ulimit -S -n 65536
> Shouldn't the operator above be ==

No, '=' is "test"'s POSIX/ISO/IEEE-standardized string comparison
operator (c.f. man test).

'==' is a bash-specific, non-standardized extension to "test". 
/bin/sh scripts should not use '=='.

Ralf





More information about the fedora-list mailing list