1.

Write the command with examples to count the number of lines ,words and characters in a file?

Answer»

This can be done using wc COMMAND (word count)-

#NUMBER of LINES

$ wc -l knowledgehut.txt 4 knowledgehut.txt

#Number of words 

$ wc -W knowledgehut.txt 3 knowledgehut.txt

#Number of characters 

$ wc -m knowledgehut.txt 19 knowledgehut.txt


Discussion

No Comment Found