views:

38

answers:

1

I have a text document (1MB, TXT file) with a little more than 17,500 lines. What I'm hoping to be able to do is to sort those lines by character length and have it output to either the same file (which is then saved) or a new file entirely. Either one works fine as long as I know ahead of time.

Bonus points if I could do it through Automator in OS X in some way as my coding/terminal abilities are... Lacking.

A: 

I converted the file to XML then used XSLT to order the entries based on string length. It was a really long way around but it worked.