Sort lines alphabetically, numerically, by length, or randomly — with deduplication and blank-line removal.