nl

A utility for numbering lines, either from a file, or from standard input.
More information.
nl {file}
cat {file} | nl {options} -
nl -t {file}
nl -b a {file}
nl -b p'FooBar[0-9]' {file}
Copyright © 2014—present the tldr-pages team and contributors.
This work is licensed under the Creative Commons Attribution 4.0 International License (CC-BY).
CC-BY