Re: Bug in expr***urgent

2010-01-19 Thread salih k
On Tue, Jan 19, 2010 at 9:10 PM, Eric Blake wrote: > According to salih k on 1/16/2010 7:32 AM: > > Piece of Script > > -- > > > > /isnum=`awk -F$delim '$1=="BH"{print $5}' $fil`/ > > / > > That's still not exactly what you ran (you marked it up afterwards), but >

Re: Bug in expr***urgent

2010-01-19 Thread Eric Blake
According to salih k on 1/16/2010 7:32 AM: > Piece of Script > -- > > /isnum=`awk -F$delim '$1=="BH"{print $5}' $fil`/ > / That's still not exactly what you ran (you marked it up afterwards), but it is close enough, I suppose. > int_num=`echo -e $isnu

Re: Bug in expr***urgent

2010-01-18 Thread salih k
On Sat, Jan 16, 2010 at 10:32 PM, salih k wrote: > > > On Sat, Jan 16, 2010 at 10:03 PM, Eric Blake wrote: > > >> According to salih k on 1/16/2010 6:38 AM: >> >> > Hi, >> > >> > thank you for the patiance ..I am sorry for being top posted. >> > The piece of script is to check alphanumeric >> >

Re: Bug in expr***urgent

2010-01-16 Thread salih k
On Sat, Jan 16, 2010 at 10:03 PM, Eric Blake wrote: > According to salih k on 1/16/2010 6:38 AM: > > > Hi, > > > > thank you for the patiance ..I am sorry for being top posted. > > The piece of script is to check alphanumeric > > > > BH(batch header) for the file having issue is > > BH|660|FILE

Re: Bug in expr***urgent

2010-01-16 Thread Eric Blake
According to salih k on 1/16/2010 6:38 AM: > Hi, > > thank you for the patiance ..I am sorry for being top posted. > The piece of script is to check alphanumeric > > BH(batch header) for the file having issue is > BH|660|FILE1|2009/12/30|28|28|19.80||878.000| > IS|123|456| > FILE2 > BH|660|FILE

Re: Auto-discard notification (was Re: Bug in expr***urgent)

2010-01-16 Thread salih k
On Sat, Jan 16, 2010 at 9:34 PM, Eric Blake wrote: > According to bug-coreutils-boun...@gnu.org on 1/16/2010 12:24 AM: > > The attached message has been automatically discarded. > > > > > > ---- >

Re: Bug in expr***urgent

2010-01-15 Thread Eric Blake
[your repeated attempts at top-posting when you have been advised not to do so are getting annoying] According to salih k on 1/15/2010 10:17 PM: > Hi, > > 1.Linux 2.6.18-92.el5 #1 SMP Tue Apr 29 13:16:15 EDT 2008 x86_64 > 2.ksh > 3.expr version:5.97 Consider upgrading - the latest stable versio

Re: Bug in expr***urgent

2010-01-15 Thread salih k
Hi, 1.Linux 2.6.18-92.el5 #1 SMP Tue Apr 29 13:16:15 EDT 2008 x86_64 2.ksh 3.expr version:5.97 Also, 1. the exit status coming is 1552 and in some cases 51198.Also In my case,the $int_num will have only positive integers. So instead of checking exit status not equal to zero for alphanumeric cha

Re: Bug in expr***urgent

2010-01-11 Thread Pádraig Brady
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"

Re: Bug in expr***urgent

2010-01-11 Thread Eric Blake
According to salih k on 1/10/2010 10:50 PM: > Hi, > There is a bug iin the expr command and exit status is"51198" some times > "1552" Exit status can never exceed 255 - per POSIX, it is strictly capped at 8 bits to all observers. I'm not sure where you are getting those numbers. > I have used ex

Bug in expr***urgent

2010-01-11 Thread salih k
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 s