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: Thu, 22 Jul 2010 11:33:43 +0100
On 22 Jul 2010, at 10:32, Tommy Bollman wrote: I'm only curious of why it is necessary to have that last space included, I'm just wondering why:
set sorted_file to do shell script ("tr -d \\\" < " & posix_path_to_csv & " | sort -n -t , -k " & column_id & " ")
There's no reason. The actual reason it's there is because the original version of the script was
do shell script ("sort -n -t , -k " & column_id & " " & posix_path_to_csv)
I then cut and pasted '& posix_path_to_csv' to use with tr -
do shell script ("tr -d \\\" < " & posix_path_to_csv & " | sort -n -t , -k " & column_id & " ")
Leaving behind & " ". Lazy programmer :-)
Steve |
_______________________________________________
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