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.