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
A
Could letter C be correct as well ?
cat -n command is good for me. 🙂
nl prints only lines that are not empty
to print all lines the answer would be
nl -ba == cat -n
nl -ba wasn’t an answer shown… just nl – hence, that’s not the right answer…