Re: Merge all names into 1 file
Re: Merge all names into 1 file
- Subject: Re: Merge all names into 1 file
- From: Emmanuel <email@hidden>
- Date: Mon, 6 Nov 2006 08:35:55 -0500
At 11:09 AM +0100 11/6/06, Jan Bultereys wrote:
Hi all,
I have 7 tekst files (in TextEditor) with content like this:
A00166
A00167
BE_00020_MCLOCKMAN
BE_00020_MMO_008
BE_99972_MPRLMGLAS2
BE_99972_MPRLMUG
F83879
F83880
....
Is it possible to merge the 7 files into ONE where all the
"duplicated" names are merged into one:
Meaning, for example if image A00166 is also in textfile 2 and 4 it
should be repeated only 1 time into the "new merged" textfile.
And of course if the name of the image is only in one of the files
it should also be in the "new merged" textfile.
Many thanks for any idea's
Jan,
You're lucky. The "sortarray" command in the version of
Satimage.osax that the latest non-public download of Smile installs
(you have to ask me the URL if you aren't subscribed to SUL) supports
a new "with unicity" parameter, which suppresses any doublon (and
sorts the list.) So you would do something like:
set list1 to paragraphs of (read file1)
set list2 to paragraphs of (read file2) etc
then:
set biglist to list1 & list2 & list3 etc
set uniqlist to sortarray biglist with unicity
set applescript's text item delimiters to return
set finaltext to uniqlist as text
etc.
Emmanuel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users
This email sent to email@hidden