another question about finding duplicates

Mark Smith mark at maseurope.net
Sun Jan 27 08:17:11 EST 2008


Peter, this is not tested:

put tData into testData
split testData by tab and cr
if the number of lines in the keys of testData <> the number of lines  
in tData then thereAreDupes

Best,

Mark

On 27 Jan 2008, at 12:33, Peter Alcibiades wrote:

> There's a file which goes roughly:
>
> 1	anything
> 2	anything
> 3	anything
> 4	anything
>
> etc
>
> It can always be sorted by the first item.  Sometimes a duplicate  
> entry will
> creep in, so the file will look
>
> 1	anything
> 2	anything
> 2	anything
> 3	anything
> 4	anything
>
> or perhaps
>
> 1	anything
> 2	anything
> 3	anything
> 3	anything
> 4	anything
>
> What's the quickest way of checking for this condition  - when the  
> two items 1
> of any two adjacent lines are identical?  I have found a brute  
> force way to
> do it using filter, but it is really clunky and slow.
>
> Cheers
>
> Peter
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list