Chapter 16. Sort Like This

The Linux GUIs are—in my opinion—on par with those of Windows or the Mac for ease of use, but until the advent of Beryl and Compiz, I didn’t think the Linux GUI was as pretty as that of the Mac, or even Windows.

Since pretty is not my top priority when choosing an operating system, I can live with that. But when you compare the command-line environment of DOS/Windows with that of Linux, it’s like comparing a tricycle with an 18-wheeler. The sort command is but one of hundreds of examples of that.

Sorting a Small File

Assume that we start with a small file containing names, phone numbers, and email addresses. Let’s call it names.txt and enter the following lines in it.

Jim Clark 210 555-1212 jclark@sanantonio.com Brenda Sweet ...

Get CLI for Noobies: A Primer on the Linux Command Line now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.