Answers for "script to count number of lines in directory"

6

shell script to count number of lines in a file

echo Enter the filename
read file
w=`cat $file | wc -w`
c=`cat $file | wc -c`
l=`grep -c "." $file`
echo Number of characters in $file is $c
echo Number of words in $file is $w
echo Number of lines in $file is $l
Posted by: Guest on February-12-2021
1

count number of lines in directory linux

find . -name '*.php' | xargs wc -l
Posted by: Guest on September-08-2020

Code answers related to "script to count number of lines in directory"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language