Transforming text
The commands that reshape text — reordering lines, removing duplicates, substituting characters, reflowing paragraphs, and counting.
referenceSort the lines of files — alphabetically, numerically, by field, and many other ways.
referenceCollapse or report adjacent repeated lines in a file.
referenceTranslate, squeeze, or delete individual characters in a stream of text.
referenceConvert tab characters in a file into spaces.
referenceConvert runs of spaces in a file back into tab characters.
referenceReflow paragraphs of text to a target line width.
referenceHard-wrap long lines at a fixed width.
referencePaginate and columnate text for printing.
referenceProduce a permuted index of the words in a file.
referenceTopologically sort items so that each comes after the things it depends on.
referenceCount the lines, words, and bytes in files.
referenceOutput the input lines in a random order.