Find Total Words,Character and Line in File In Linux Shell Scripts
Source Code ::
echo "1: Count Line From File";
echo "2: Count Words From File";
echo "3: Count Character From File";
while ((1))
do
echo "Enter The Above Choice:->";
read c
case $c in
1)
echo "Enter The File Name:->";
read fname
printf "Total Line is:->"
wc -l $fname;
;;
2)
echo "Enter The File Name For Count Words:->";
read fname
printf "Total Words Is:->";
wc -w $fname;
;;
3)
echo "Enter The File Name For Count Character:->";
read fname
printf "Total Characters Is:->";
wc -c $fname;
;;
0) exit
;;
*) echo "Enter The Valid Choice:";
;;
esac
done
Find Total Words,Character and Line in File In Linux Shell Scripts
Reviewed by Unknown
on
23:11
Rating:
No comments: