bug-coreutils
[Top][All Lists]
Advanced

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

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


From: salih k
Subject: Re: Auto-discard notification (was Re: Bug in expr***urgent)
Date: Sat, 16 Jan 2010 21:38:46 +0800

On Sat, Jan 16, 2010 at 9:34 PM, Eric Blake <address@hidden> wrote:

> According to address@hidden on 1/16/2010 12:24 AM:
> > The attached message has been automatically discarded.
> >
> >
> > ------------------------------------------------------------------------
> >
> > Subject:
> > Re: Bug in expr***urgent
> > From:
> > salih k <address@hidden>
>
> It looks like the list spam filter was accidentally turned up too high in
> the last few hours, and ate your most recent message before it could get
> through to the list.  I've relaxed the spam filter so that future message
> from you can still get through, but would you mind resending your query to
> the list?
>
> --
> Don't work too hard, make some time for fun as well!
>
> Eric Blake             address@hidden
>

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|FILE2|2009/12/30|1|1|19.80||878.000|

Piece of Script
------------------------
 isnum=`awk -F$delim '$1=="BH"{print $5}' $fil`
# HERE 5 THE FIELD FILE1 IS sum of records =28
        #awk -F$delim '$1=="BH"{print $5}' $fil |read isnum
 log_msg "Debug msg1 File $fil has isnum $isnum"
        isnum=${isnum:-0}
 log_msg "Debug msg2 File $fil has isnum $isnum"
        int_num=`echo -e $isnum | cut -f1 -d'.'`
 log_msg "Debug msg3 File $fil has int_num $int_num"
        add_num=`expr $int_num + 1 1>/dev/null 2>&1`
 if [ "$?" -ne "0" ] then

         padd_num=`expr $int_num + 1 1>/dev/null 2>&1`
  log_msg "Debug msg4 File $fil with paddnum has expr pstat $?"
  #padd_num1=`expr $int_num + 1`
  log_msg "Debug msg5 File $fil with paddnum1 $padd_num1 pstat1 $?"
                errmsg "File `basename $fil` has alpha-numeric value in
header record for total shipments !!! aborting"
  sleep 1
                log_msg "Upload of $fil aborting"
                log_msg "------------------------------------------------"
                out_rep $repfil "\nFile `basename $fil` has alpha-numeric
value in header record for total shipments !!! aborting"
                continue
        fi
 continue for next check
Note:This issue happens only very rate bu this also need to be eliminated.
I am able to simulate it once .Please find the below debug  output
Debug msg1 File FILE1 has isnum 28 and pstat 0
Debug msg2 File FILE1 has isnum 28
Debug msg3 File FILE1 has int_num 28 has ps 0
Debug msg3.1 File FILE1 has int_num1 28 has ps 0
Debug msg4.new1 File has expr pstat 51198 int_num is 28
Debug msg4 File FILE1 with paddnum has expr pstat 0
Debug msg5 File FILE1 with paddnum1 29 pstat1 0
File FILE1 has alpha-numeric value in header record for total shipments !!!
aborting
Upload of FILE1 aborting
=============================

Debug msg3 File FILE2  has int_num 1 has ps 0
Debug msg3.1 File  FILE2 has int_num1 1  has ps 0
Debug msg4.new1 File has expr pstat 1552 int_num is 1
Debug msg4 File FILE2  with paddnum has expr pstat 0
 These records then loaded succesfully after running it again!!! without any
code change
51198 mod 256= 254
1552 mod 256=16
1. is it becuase of expr command is not stable in linux and need to upgrade
or use other commands like case as you given?The same script is working
without any issue in unix
2.Is it expr command issue or linux intearnal issue

Thanks,
Salih


reply via email to

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