Sorting

Contents:
Putting Things in Order
Sort Fields: How sort Sorts
Changing the Field Delimiter
Confusion with White Space Field Delimiters
Alphabetic and Numeric Sorting
Miscellaneous sort Hints
Sorting Multiline Entries
lensort: Sort Lines by Length
Sorting a List of People by Last Name

Putting Things in Order

Sorting a file under UNIX is easy, right? Of course it is, if all you want to do is sort a list of single words, or sort lines starting with the first character in the line. But if you want to do more than that, there's a lot more to the sort command than typing:

% sort filename


But learning the mechanics of sort isn't the end of the story. Like most of the other things you'll find in the UNIX toolbox, sort is even more powerful when it's used with other programs. For example, you can:

- TOR