[Cert] ==
Lawrence Kagan
cert@flux.org
Sat, 17 Jun 2006 21:55:47 -0400
--=-qzU5V+ucb/wGwPpGeIC9
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
My results were actually wrong. My script had a syntax error that I
didn't notice until now. Here's the script I used but after the
correction:
#!/bin/bash
STRING='some string';
if [ "$STRING" == "$STRING" ]
then
echo "[ $STRING == $STRING ] is valid"
else
echo "[ $STRING == $STRING ] is not valid"
fi
Notice the double quotes around $STRING. They weren't there when I
wrote this today.
Thanks Rafal!
Larry
On Sat, 2006-06-17 at 18:43 -0400, Mike Roach wrote:
> Rafal wrote:
> > FYI ...
> >
> > $ echo $SHELL; if [ 'a' == 'a' ]; then echo 'yes'; fi
> > /bin/bash
> > yes
> >
> > Rafal
> >
> > --
> > Always listen to experts. They'll tell you what can't be done
> > and why. Then do it.
> > -- Robert A. Heinlein
>
> Interesting, and under the circumstances, what a profound sig. For
> purposes of the test, though, I would recommend going with the book. I
> think Larry mentioned the test as well.
> _______________________________________________
> Cert mailing list
> Cert@flux.org
> http://www.flux.org/mailman/listinfo/cert
--=-qzU5V+ucb/wGwPpGeIC9
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.10.2">
</HEAD>
<BODY>
My results were actually wrong. My script had a syntax error that I didn't notice until now. Here's the script I used but after the correction:<BR>
<BR>
#!/bin/bash<BR>
STRING='some string';<BR>
<BR>
if [ "$STRING" == "$STRING" ]<BR>
then<BR>
echo "[ $STRING == $STRING ] is valid"<BR>
else<BR>
echo "[ $STRING == $STRING ] is not valid"<BR>
fi<BR>
<BR>
<BR>
Notice the double quotes around $STRING. They weren't there when I wrote this today. <BR>
<BR>
Thanks Rafal!<BR>
<BR>
Larry<BR>
<BR>
On Sat, 2006-06-17 at 18:43 -0400, Mike Roach wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">Rafal wrote:</FONT>
<FONT COLOR="#000000">> FYI ...</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> $ echo $SHELL; if [ 'a' == 'a' ]; then echo 'yes'; fi</FONT>
<FONT COLOR="#000000">> /bin/bash</FONT>
<FONT COLOR="#000000">> yes</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> Rafal</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000"> > --</FONT>
<FONT COLOR="#000000"> > Always listen to experts. They'll tell you what can't be done</FONT>
<FONT COLOR="#000000"> > and why. Then do it.</FONT>
<FONT COLOR="#000000"> > -- Robert A. Heinlein</FONT>
<FONT COLOR="#000000">Interesting, and under the circumstances, what a profound sig. For </FONT>
<FONT COLOR="#000000">purposes of the test, though, I would recommend going with the book. I </FONT>
<FONT COLOR="#000000">think Larry mentioned the test as well.</FONT>
<FONT COLOR="#000000">_______________________________________________</FONT>
<FONT COLOR="#000000">Cert mailing list</FONT>
<FONT COLOR="#000000"><A HREF="mailto:Cert@flux.org">Cert@flux.org</A></FONT>
<FONT COLOR="#000000"><A HREF="http://www.flux.org/mailman/listinfo/cert">http://www.flux.org/mailman/listinfo/cert</A></FONT>
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>
--=-qzU5V+ucb/wGwPpGeIC9--