Count lines,words in a file
Do you like this story?
Write a shell script which counts the number of lines and words present in a given file.
echo Enter a file name:
read fn
echo Number of Lines:
wc –l $fn
echo Number of Words:
wc –w $fn
echo Number of Characters:
wc –c $fn

This post was written by: Rajendra Prasad
Rajendra Prasad is a professional blogger, web designer and front end web developer. Follow him on Facebook