Unique items in list
Unique items in list
- Subject: Unique items in list
- From: Eric Geoffroy <email@hidden>
- Date: Thu, 21 Oct 2004 10:22:12 -0700
Golly I should be able to handle this simple task but I'm failing.
I have a long list that has a lot of dupes. I needs to be narrowed to
unique items. I've tried to ways to attack this.
Method A: Works, but I end up with a column of results that I can't
coerce back into a list.
repeat with x in finals
set end of finals to x & ", "
end repeat
set finals to (do shell script "echo " & (quoted form of (finals as
string) & " | " & "sort -u"))
Method B: Doesn't work at all.
set finals to {1, 5, 5, 5, 6, 66, 999}
set juz to {}
repeat with x in finals
if x is not in juz then set end of juz to x
end repeat
contents of juz
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden