Which commands will print line numbers before each line in a file?
(Select TWO)
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
C. nl is the other command not ln which is for making soft link
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.
cat -n
nl
are teh correct answers