how to count the number of lines if line contains words in linux code example
Example 1: count number of lines in directory linux
find . -name '*.php' | xargs wc -l
Example 2: grep count lines
cat myfile | wc -l
find . -name '*.php' | xargs wc -l
cat myfile | wc -l