November 1998
Beginner
368 pages
7h 58m
English
If you want to be really lazy—er, um, smart—let UNIX sort files for you. You can use sort to, for example, sort your address book alphabetically—as opposed to the random order you might have entered addresses in (see Code Listing 6.17).
To sort files with sort:
sort address.book > → sorted.address.book
Tip
If you have multiple files to sort, you can use sort file1 file2 file3 > complete.sorted.file, and the output will contain the contents of all three files, sorted, of course.
Read now
Unlock full access