Number lines
low risk
Prints a file with line numbers (only for non-empty lines by default).
| Flag | Meaning |
|---|---|
-ba | Number all lines |
-w | Number width |
nl -ba file.txtNumber every line · explain & risk-check →Reference text is hand-written and may be incomplete — check man nl for your version. Test destructive commands on a non-production system first.