Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: korn shell and arithmetic

RE: korn shell and arithmetic

From: Mercadante, Thomas F <thomas.mercadante_at_labor.state.ny.us>
Date: Tue, 22 Jun 2004 13:15:23 -0400
Message-ID: <DE8A21F8F1D0254EA4A9214D52AB2FEDAD5C5A@exchsen0a1ma>


Ryan,

Did you try this?

if [ 1.2 > 1.0 ]; then

   echo yes
else echo no
fi

Worked for me.

Tom Mercadante
Oracle Certified Professional

-----Original Message-----

From: ryan.gaffuri_at_comcast.net [mailto:ryan.gaffuri_at_comcast.net] Sent: Tuesday, June 22, 2004 1:06 PM
To: oracle-l_at_freelists.org
Subject: OT:korn shell and arithmetic

I don't know any unix listservs... so I hope this is ok.

I am trying to do the following:

if [ 1.2 -gt 1.0 ]; then

   echo yes
else echo no
fi

It alwys comes out no? Anyway to get around this?

Also when I do:

expr 0 + 0, I get a $? of 1, which kills my error handling. any idea why?



Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--

Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html

-----------------------------------------------------------------
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to: oracle-l-request_at_freelists.org
put 'unsubscribe' in the subject line.
--

Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
Received on Tue Jun 22 2004 - 12:12:32 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US