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
If you like this please Link Back to this article...
0 comments:
Post a Comment