~/ learn/ comp-325/ cards/ Keys, adjacency, and an expression language
1 of 16

The four sort invocations, against one fixture

The four sort invocations, against one fixture

Answer

sort -u cities sort -k 2 cities sort -r cities sort -n cities

Nine lines, then the same ten grouped by city, then the default order reversed, then an output identical to plain sort — because the stock numbers are zero-padded to a fixed width, which is the only reason numeric and text order agree.

Sarwar & Koretsky 3e ch7 §7.3–7.4 and ch6 §6.7

space flip · ← → navigate · esc to exit
NORMAL ~/memra/library/1d88718a-f7cc-4196-bf20-abb10cd1b197/flashcard utf-8 LF