Re: Merge all names into 1 file
Re: Merge all names into 1 file
- Subject: Re: Merge all names into 1 file
- From: "Mark J. Reed" <email@hidden>
- Date: Mon, 6 Nov 2006 09:37:35 -0500
On 11/6/06, Jan Bultereys <email@hidden> wrote:
I have 7 text files
....
Is it possible to merge the 7 files into ONE where all the "duplicated"
names are merged into one.
Sure.
do shell script "sort -u " & (quoted form of POSIX path of file1) & "
" & (quoted form of POSIX path of file2) & " " & ... & " " & (quoted
form of POSIX path of file7) & ">" & (quoted form of POSIX path of
resultFile)
if you have the filenames in a list you can of course build the
command string up with a loop, which would be less unwieldy (more
wieldy?). If you really want 'all the files in this folder' then that
would be a better way to approach it, too. The important thing is
that you wind up with a shell command that consists of "sort -u "
followed by the quoted POSIX paths of all the files, separated by
spaces, followed by ">" and the quoted POSIX path of the file you want
the sorted uniquified results to go into.
--
Mark J. Reed <email@hidden>
_______________________________________________
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