NL(1)

πŸ“¦
version 9.10 Β· 5 versions
, in ubuntu stonking

πŸ’… NL(1) β€” the number-lines-of-files manual, bestie edition

okay so this is the manual page for nl, which lives in section 1 (User Commands) of the man pages. she's a coreutils girlie and she's about to number your lines. let's go πŸŽ€


✨ NAME ✨

nl β€” number lines of files πŸ”’


🌸 SYNOPSIS 🌸

nl [OPTION]... [FILE]...

πŸ¦‹ DESCRIPTION πŸ¦‹

Write each FILE to standard output, with line numbers added. that's it, that's the whole gig. she takes your text, she puts numbers next to it, she serves. πŸ’–

With no FILE, or when FILE is -, read standard input. (yes bestie the classic - means stdin, we love a flexible icon 🫢)

Mandatory arguments to long options are mandatory for short options too. no cap β€” if it needs a value, it needs a value.

πŸ‘‘ the options, one by one

  • -b, --body-numbering=STYLE β€” use STYLE for numbering body lines
  • -d, --section-delimiter=CC β€” use CC for logical page delimiters
  • -f, --footer-numbering=STYLE β€” use STYLE for numbering footer lines
  • -h, --header-numbering=STYLE β€” use STYLE for numbering header lines
  • -i, --line-increment=NUMBER β€” line number increment at each line
  • -l, --join-blank-lines=NUMBER β€” group of NUMBER empty lines counted as one
  • -n, --number-format=FORMAT β€” insert line numbers according to FORMAT
  • -p, --no-renumber β€” do not reset line numbers for each section
  • -s, --number-separator=STRING β€” add STRING after (possible) line number
  • -v, --starting-line-number=NUMBER β€” first line number for each section
  • -w, --number-width=NUMBER β€” use NUMBER columns for line numbers
  • --help β€” display this help and exit
  • --version β€” output version information and exit

πŸ“ the defaults (aka her factory settings, iconic)

Default options are: -bt -d'\:' -fn -hn -i1 -l1 -n'rn' -s<TAB> -v1 -w6

πŸ’œ about CC (the section delimiter thing)

CC are two delimiter characters used to construct logical page delimiters; a missing second character implies :. As a GNU extension one can specify more than two characters, and also specifying the empty string (-d '') disables section matching. lowkey powerful, ngl 🌈

🧚 STYLE is one of:

  • a β€” number all lines
  • t β€” number only nonempty lines
  • n β€” number no lines
  • pBRE β€” number only lines that contain a match for the basic regular expression, BRE

⭐ FORMAT is one of:

  • ln β€” left justified, no leading zeros
  • rn β€” right justified, no leading zeros
  • rz β€” right justified, leading zeros

πŸ’– AUTHOR πŸ’–

Written by Scott Bartram and David MacKenzie. absolute legends, we stan πŸ‘‘


πŸ™ˆ REPORTING BUGS πŸ™ˆ

(if something's broken, tell the devs, don't suffer in silence bestie 😭)


πŸ”₯ SEE ALSO πŸ”₯


ngl this page also carries the packaging and license tea: Packaged by Ubuntu (9.10-1ubuntu2), Copyright Β© 2026 Free Software Foundation, Inc., License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. β€” fr fr, no warranty, read the fine print πŸ’€

and that's the whole thing!! this page shipped with GNU coreutils 9.10, dated August 2026, and honestly? she ate. go number some lines, main character πŸ’…βœ¨πŸŒˆ

πŸ“¦ where this page comes from