Horje
shell script to count number of lines in a file Code Example
shell count number of lines
$ wc -l < /dir/file.txt
3272485
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




Shell

Related
download sublime text ubuntu 20.04 Code Example download sublime text ubuntu 20.04 Code Example
git status just shows directory and not files Code Example git status just shows directory and not files Code Example
install github linux Code Example install github linux Code Example
brew stop redis Code Example brew stop redis Code Example
elastic beanstalk installation problem Code Example elastic beanstalk installation problem Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9