--- layout: page author: Domenico Votta category-page: advanced category-title: Advanced commands tags: number lines count title: nl --- The nl is a command that permits to number the lines. Through some flags you can decide how to filter this command.
We have a file named example.txt that contains 5 elements, to test this command: {% highlight bash %} Car Computer Robot Smartphone Videogame {% endhighlight %} The syntax command is:
 nl [flags][file] 
nl example.txt
    1  Car
    2  Computer
    3  Robot
    4  Smartphone
    5  Videogame
How you can see the command has numbered the lines.

Flags