nl
From NetBSD Wiki
The nl(1) (or "number-line") 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.
% nl helloworld.c
1 #include <stdio.h>
2 void main(void)
3 {
4 printf("Hello World! \n");
5 }
%
