bug-coreutils
[Top][All Lists]
Advanced

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

Re: Bug in expr***urgent


From: Pádraig Brady
Subject: Re: Bug in expr***urgent
Date: Mon, 11 Jan 2010 13:21:26 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0

On 11/01/10 05:50, salih k wrote:
Hi,
There is a bug iin the expr command and exit status is"51198" some times
"1552"
I have used expr to check whether the variable is numeric
        add_num=`expr $int_num + 1 1>/dev/null 2>&1`
  kms=$?
        # if [ "$?" -ne "0" ]
          if [ "$kms" -ne "0" ]
         then
here $kms returns exit status other than zero even if $int_num is numeric

That works fine here:

  expr $int_num + 0 && echo numeric

You'll need to provide the version of expr
and the shell you're using at least.

cheers,
Pádraig.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]