linux - Counting lines starting with a certain word -


how count number of lines in text file starting word?

i not want use sed , wc -l. better solution?

try this:-

  awk '/^yourwordtofind/{a++}end{print a}' file 

Comments

Popular posts from this blog

php - Cakephp Not validating data in Form -

java - RSS Feed Parsing, extracting field value -