Closed Captioning Closed captioning available on our YouTube channel

How to use the nl command: 2-Minute Linux Tips

Network World | Jul 30, 2021

In this Linux tip, learn how to use the nl command. It stands for “number lines” and it does just that.

Copyright © 2021 IDG Communications, Inc.

Similar
Hi, this is Sandra Henry-Stocker, author of the “Unix as a Second Language” blog on Network World.
In this Linux tip, we’re going to look at the nl command. It stands for “number lines” and it does just that. Hand the nl command a file like this:
and it will add line numbers to your output.
If you want to save the output, you can easily write it to another file.
You can also use the nl command to number the lines in any command output. Just pipe the command output to nl like this:
That’s your Linux tip for the nl command.
If you have questions or would like to suggest a topic, please add a comment below. And don’t forget to subscribe to the IDG Tech(talk) channel on YouTube.
If you liked this video, please hit the like and share buttons. For more Linux tips, be sure to follow us on Facebook, YouTube and NetworkWorld.com.
Popular
Featured videos from IDG.tv