Hi Francois,
I copied and pasted your data into a file that I called unique.dat.
I wrote a little script and put it in the file unique.r
Here's the script:
REBOL []
data: read/lines %unique.dat
get-column: func [ table [block!] column [integer!] /local result] [
result: make block! length? table
foreach entry table [
append result pick parse entry none column
]
return result
]
unique?: func [item [string!] column [integer!] table [block!]] [
table: get-column table column
return empty? intersect reduce [item] table
]
save-record: func [ "dummy function. displays data that should be saved"
record ] [
print ["saved:" mold record]
]
unique-data?: func [] [
forall data [
date: first parse first data none
next-data: next data
either unique? date 1 next-data [
save-record first data
] [
print "found duplicate"
]
]
data: head data
print "done"
]
unique-data?
;- Elan >> [: - )]