UNIX Power Tools

UNIX Power ToolsSearch this book
Previous: 35.23 Rotating Text Chapter 36Next: 36.2 Sort Fields: How sort Sorts
 

36. 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

36.1 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


Previous: 35.23 Rotating Text UNIX Power ToolsNext: 36.2 Sort Fields: How sort Sorts
35.23 Rotating Text Book Index36.2 Sort Fields: How sort Sorts

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System