Skip to Content
gnux

-b, --body-numbering

Use STYLE for numbering body lines (a, t, n or pBRE; default t).

An option of nlx.

Usage

nlx -b STYLE [FILE]...
nlx --body-numbering=STYLE [FILE]...

Details

ShortLongValueDefaultMeaning
-b--body-numberingSTYLEuse STYLE for numbering body lines (a, t, n or pBRE; default t)

Examples

Number every line, empty ones included, to match an editor's line numbers

nlx -b a main.go

Find which lines of a crontab are active jobs (not comments)

nlx -b 'p^[^#]' crontab.txt

Number a git diff's lines to discuss them in a review

git diff | nlx -b a

Collapse runs of empty lines so only every second one gets a number

nlx -b a -l 2 poem.txt

Help in the terminal

gnux help nlx --body-numbering

On this page