[HPADM] Awk prog writing dups records

From: Lal, Neeraj (Neeraj.Lal_at_pfizer.com)
Date: 09/19/03

  • Next message: Dave T.: "[HPADM] RE: SUMMARY: How to Mirror Disks to VA & Then Remove Old Disks"
    To: "'hpux-admin@DutchWorks.nl'" <hpux-admin@dutchworks.nl>
    Date: Thu, 18 Sep 2003 18:39:32 -0400
    
    

    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)
    

  • Next message: Dave T.: "[HPADM] RE: SUMMARY: How to Mirror Disks to VA & Then Remove Old Disks"

    Relevant Pages

    • [HPADM] Re: Script to copy /home
      ... file xfer utility, so if you have only a few file changes, only the diffs ... I am writing a small script to copy the home dir's ... This message and its attachments may contain privileged and confidential ... To subscribe/unsubscribe to this list, ...
      (HP-UX-Admin)
    • [HPADM] Re: hp-ux hardware monitoring
      ... detect hardware problems on hp-ux 11.i servers. ... Problems that should be detected by this script are ... Do you Yahoo!? ... To subscribe/unsubscribe to this list, ...
      (HP-UX-Admin)
    • [HPADM] Scritping Questions
      ... I am trying to make a script to monitor my systems ... SBC Yahoo! ... To subscribe/unsubscribe to this list, ...
      (HP-UX-Admin)
    • [HPADM] Fwd: RE: [SUMMARY] VA/LUN question
      ... I just want to let you know the following Rick's comment about the script. ... Please do not bug Rick if the script does not work for your environment. ... >not supported by HP and depending on which model VA or firmware it may or ... To subscribe/unsubscribe to this list, ...
      (HP-UX-Admin)