Re: Sort Array by Column X
Re: Sort Array by Column X
- Subject: Re: Sort Array by Column X
- From: Steve Thompson <email@hidden>
- Date: Mon, 26 Jul 2010 15:09:02 +0100
On 26 Jul 2010, at 14:40, Richard Lake wrote: Not sure its possible to stipulate whether to ignore the first line of the csv file. No, but you can copy it out, sort everything that isn't the first line and then glue the two parts together
set formData to do shell script ("head -n 1 " & POSIX path of (path to scripts folder) as text) & "formdb.csv" set formData to formData & ( do shell script (("tr -d \\\" < " & POSIX path of ( path to scripts folder) as text) & "formdb.csv" & " | tail -n +2 | sort -r -n -t , -k" & column & " "))
|
_______________________________________________
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