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

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

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

A.
cat-n

B.
numline

C.
nl

D.
In

Explanation:
Syntax: cat [option] filename.
Options:
-n, -b Display the line number before each line
-A Show all characters including control characters.
-s Squeeze multiple adjacent blank lines into one line



Leave a Reply 5

Your email address will not be published. Required fields are marked *


felipe

felipe

Could letter C be correct as well ?

mr_tienvu

mr_tienvu

cat -n command is good for me. 🙂

tomek

tomek

nl prints only lines that are not empty
to print all lines the answer would be

nl -ba == cat -n

Tom Liddle

Tom Liddle

nl -ba wasn’t an answer shown… just nl – hence, that’s not the right answer…