How to sort the contents of the clipboard
Here's a little tip you might find usefull. If you have something in a clipboard that needs sorting, issue this command on the commandline.
pbpaste | sort | pbcopy
When you paste your clipboard somewhere you'll see the contents was sorted.