Passing Return-Delimited Text to UNIX Sort
Passing Return-Delimited Text to UNIX Sort
- Subject: Passing Return-Delimited Text to UNIX Sort
- From: Rick Gordon <email@hidden>
- Date: Mon, 08 Jul 2013 22:19:31 -0700
Using AppleScript, I want to find a methodology for alphabetically sorting non-file-based data with a sort routine that doesn't require any add-on scripting additions or non-universal applications.
For instance, if I have compiled an unsorted list of strings, and then coerced that into a string of text lines separated by a return, how can I pass that to the UNIX sort command?
I've tried...
return (do shell script "sort <<< " & (nameList as string))
... but that isn't working, nor is ...
return (do shell script "echo nameList as string | sort")
I'm sure this is just some basic misunderstanding. I ned to get clear on the basic principle of redirecting an existing string to a command that normally acts on files.
--
___________________________________________________
RICK GORDON
EMERALD VALLEY GRAPHICS AND CONSULTING
___________________________________________________
WWW: http://www.shelterpub.com
_______________________________________________
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/archives/applescript-users
This email sent to email@hidden