Help with Array Usage



Hi All,

I need some help on how i can proceed for the question below.

I have a file <test.txt> with the contents as below:

test 1 1 0
testa 1 1 0
test 2 2 0
test 1 2 0
test 2 3 0
testb 2 2 0
testc 3 3 0
test 2 4 0
test 3 3 0

Next i need to get the 'unique' numbers in the first column for the
row which starts with 'test'.

Next i need to overwrite the same file <test.txt> with the same
contents as above and in addition i need to add a line like 'testfinal
1 0 0' for the unique numbers.

Example Output file <test.txt>:

test 1 1 0
testa 1 1 0
test 2 2 0
test 1 2 0
test 2 3 0
testb 2 2 0
testc 3 3 0
test 2 4 0
test 3 3 0
<-- New lines below-->
testfinal 1 0 0
testfinal 2 0 0
testfinal 3 0 0

Thanks for the help.
.



Relevant Pages

  • Re: Help with Array Usage
    ... testa 1 1 0 ... testb 2 2 0 ... testc 3 3 0 ... my %thash; ...
    (comp.lang.perl.misc)
  • Re: Macro - MsgBox
    ... How can i give a msg box with multiple text? ... TestA 2. ... TestB 3. ... TestC"), all these are ...
    (microsoft.public.excel.worksheet.functions)
  • Macro - MsgBox
    ... How can i give a msg box with multiple text? ... TestA 2. ... TestB 3. ... TestC"), all these are ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Garbage collection problem
    ... > line 17 instantiates a TestA object, ... > the instance variable of TestB object a to the TestA object. ... In Java an object is eligible for GC if it is not ... same eligibility for GC. ...
    (comp.lang.java.programmer)
  • =?iso-8859-15?Q?Re:_Von_welcher_TextBox_wurde_das_Ereignis_ausgel=F6st=3F?=
    ... ich habe zwei Textboxen (TextBox1 mit dem Namen TestA ... und TextBox2 mit dem Namen TestB). ... Weiterhin habe ich für beide TextBoxen das gleiche Ereignis ... Private Sub TestA_TextChanged(ByVal sender As System.Object, ...
    (microsoft.public.de.german.entwickler.dotnet.vb)