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

Unable to remove the www from url on https using .htaccess -