[HPADM] Awk prog writing dups records

From: Lal, Neeraj (Neeraj.Lal@pfizer.com)
Date: Thu Sep 18 2003 - 18:39:32 EDT


Hi

I am running the following script

awk </medicaid/prod/RCS/lal/carsis_cont_bgrp.dat \

'{ if ( substr($0,42,2) == "20" )
 {
x1=substr($0,1,41);
x2=substr($0,44,6);
x3=substr($0,52,102);
print x1 "1" x2 "1" x3;
}else{
print x1 "0" x2 "0" x3;
}
}
'

It is doing fine the only problem is it is writing duplicate records again
and again what may be problem

 

Neeraj Lal
Pfizer Inc.
Consultant CHC-IS
973-385-2734

--
             ---> Please post QUESTIONS and SUMMARIES only!! <---
        To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl
       Name: hpux-admin@dutchworks.nl     Owner: owner-hpux-admin@dutchworks.nl
 
 Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse only)
            http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse & search)


This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 11:02:34 EDT