PrepAway - Latest Free Exam Questions & Answers

Which commands will print line numbers before each line in a file?

Which commands will print line numbers before each line in a file?
(Select TWO)

PrepAway - Latest Free Exam Questions & Answers

A.
cat -n

B.
numline

C.
nl

D.
ln

Explanation:
cat [option] filename
(-n or -b) Display the line number before each line
numline command does not exist
ln creates links between files

3 Comments on “Which commands will print line numbers before each line in a file?

  1. mr_tienvu says:

    nl copies each specified file to the standard output, with line numbers added to the lines. The line number is reset to 1 at the top of each logical page. nl treats all of the input files as a single document and does not reset line numbers or logical pages between files. A logical page consists of: header, body, and footer.

    The beginnings of the sections of logical pages are indicated in the input file by a line containing nothing except one of the following delimiter strings:

    \:\:\: start of header
    \:\: start of body
    \: start of footer

    The section delimiter strings are replaced by an empty line on output. Any text that comes before the first section delimiter string in the input file is considered to be part of a body section, so a file that does not contain any section delimiter strings is considered to consist of a single body section.




    0



    0

Leave a Reply