Linux NL Command Detailed

Source: Internet
Author: User

NL Common Command Parameters

The NL command is used in a Linux system to calculate the line number of a file

-B: Specifies the way the line number is specified, mainly in two ways:

-B A: Indicates that the line number (similar to cat-n) is also listed, whether or not it is a blank line;

-B T: If there is a blank line, the empty line does not list the row number (default);

-N: List the method of line number representation, there are three main kinds:

-N LN: The line number is displayed at the left of the screen;

-N RN: The line number is displayed on the very right of its own field and does not add 0;

-N RZ: line number in its own field to the right of the display, and add 0;

Commonly used commands are shown:

Add line numbers regardless of the blank line no

[Email protected] omc]# Nl-b a last.txt  

Blank lines do not display line numbers

[Email protected] omc]# nl-b t Last.txt  

Line number in right

Line number in left

Linux NL Command Detailed

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.