sort of "uniq" on column

From: Vipin sharma (vipshasun_at_hotmail.com)
Date: 06/26/03

  • Next message: Rob Helmer: "cron using UTC w/o resetting system timezone?"
    To: sunmanagers@sunmanagers.org
    Date: Thu, 26 Jun 2003 17:46:50 +0000
    
    

    Hi Gurus

    I have a report in simple text file as follows

    This is 1st test file with 543563 numbers
    This is 2nd test file with 345212 numbers
    This is 3rd test file with 989834 numbers
    This is 4th test file with 543563 numbers
    This is 5th test file with NULL numbers
    This is 1st test file with 743455 numbers
    This is 4th test file with 345212 numbers
    This is 2nd test file with 989834 numbers

    Please note all the fields are separated by "|" so that I can use awk -F"|"

    I want to have output like

    This is 1st test file with 543563 numbers
    This is 2nd test file with 345212 numbers
    This is 3rd test file with 989834 numbers
    this is 5th test file with NULL numbers
    This is 1st test file with 743455 numbers

    I mean script should check first number in first line and then compare the
    number with rest of the lines if it find the duplicate number then delete
    that line
    Then go to 2nd line and do the same operation on rest of the line, then go
    to third line and so on.

    TIA
    vipin

    _________________________________________________________________
    MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
    http://join.msn.com/?page=features/virus
    _______________________________________________
    sunmanagers mailing list
    sunmanagers@sunmanagers.org
    http://www.sunmanagers.org/mailman/listinfo/sunmanagers


  • Next message: Rob Helmer: "cron using UTC w/o resetting system timezone?"

    Relevant Pages

    • Re: Unique file names.
      ... > I have a Perl program which reads STDIN and breaks it into ... I don't know the name of the report until the report is complete. ... > This means that I must generate a test file name, ... As far as I know 'rename' is atomic, ...
      (perl.beginners)
    • Unique file names.
      ... I don't know the name of the report until the report is complete. ... This means that I must generate a test file name, ... test file name and loop. ... "atomicity" of sysopen on other platforms. ...
      (perl.beginners)
    • Re: Repeating data in Merge or conditional use of fields
      ... See the "Group Multiple items for a single condition" item on fellow MVP ... having a DOT template pick up the fields for the report. ... I have a test file that has 5 items and 4 fields within each item can ... information"} but it's displaying information from all the items. ...
      (microsoft.public.word.mailmerge.fields)
    • Re: Problem with Textarea - Mozilla
      ... > Try whether that helps and report back. ... Thanks, Martin, it works Ok now, I created test file 1: ... Paul ... Prev by Date: ...
      (comp.lang.javascript)
    • Repeating data in Merge or conditional use of fields
      ... having a DOT template pick up the fields for the report. ... I have a test file that has 5 items and 4 fields within each item can ... information"} but it's displaying information from all the items. ...
      (microsoft.public.word.mailmerge.fields)