View Single Post
FWIW a lazy implementation of sorting in Applescript might look like this:

on sort(my_list)
	set {dlm, my text item delimiters} to {my text item delimiters, linefeed}
	set lstSorted to paragraphs of (do shell script "echo " & quoted form of (my_list as text) & " | sort")
	set my text item delimiters to dlm
end sort
(you could append the -r switch for a reversed sort)