D
Deepu
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.
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.