-n, --number-format
Insert line numbers according to FORMAT (ln, rn or rz; default rn).
An option of nlx.
Usage
nlx -n FORMAT [FILE]...
nlx --number-format=FORMAT [FILE]...Details
| Short | Long | Value | Default | Meaning |
|---|---|---|---|---|
-n | --number-format | FORMAT | insert line numbers according to FORMAT (ln, rn or rz; default rn) |
Examples
Give records fixed-width, zero-padded IDs
nlx -n rz -w 5 -s , names.txt > names.csv00001,Ada
00002,Grace
00003,LinusNumber lines left-aligned with no padding before the text
nlx -n ln -w 1 -s ' ' todo.txtHelp in the terminal
gnux help nlx --number-format