• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Checking for duplicates in lists
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Checking for duplicates in lists


  • Subject: Re: Checking for duplicates in lists
  • From: Emmanuel <email@hidden>
  • Date: Mon, 12 Jan 2004 00:12:05 +0100

At 10:43 AM -0800 02/01/04, Christopher Nebel wrote:
>On Jan 2, 2004, at 8:04 AM, Emmanuel wrote:
>>
>>----------- tested
>>set x to change "^(.+)(\\r\\1)+" into "\\1" in x with regexp
>>-----------
>
>Nah -- use uniq(1), since that's what it's there for:
>
> set x to do shell script "echo " & x & " | sort | uniq -d"

We don't really want to *suppress* duplicates, we want unique items.

(Furthermore we were return-separated)

set x to do shell script "echo " & x & " | tr '\\r' '\\n' | sort | uniq"

Emmanuel
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Checking for duplicates in lists (From: Emmanuel <email@hidden>)
 >Re: Checking for duplicates in lists (From: Christopher Nebel <email@hidden>)

  • Prev by Date: Re: Elementary fie naming question
  • Next by Date: Re: parsing Unix date
  • Previous by thread: Re: Checking for duplicates in lists
  • Next by thread: Re: Checking for duplicates in lists
  • Index(es):
    • Date
    • Thread