Write a Linux shell script to count number of characters, words & lines, Unix program to count number of characters, words & lines
Program
clear
echo-n "Enter file name:"
read fn
c='wc-c<$fn
w='wc-w<$fn
l='wc-l<$fn
echo"NO. of characters:"$C
echo"No.of Words:"$w
echo"No.of Lines:"$1
Output:
Enter file name: temp.sh
No.of characters:359
No. of words:45
No. of lines:6
<<< Previous || Current || Next >>>
No comments:
Post a Comment