nl
The nl utility reads lines from the named file or the standard input if the file argument is omitted, applies a configurable line numbering filter operation and writes the result to the standard output.
See man nl
for further information.
Visit the following resources to learn more: