Lines count & words count for all files in given directory

--->>cat>/home/prabhucloudxlab/prabhu/input.txt
Hai this is hari
Hai this is hari
Hai this is hari
Hai this is hari
I am looking for an ETL / Hadoop / Big Data /DWH Testing profile job..
Please let me know if you have any openings regarding ETL / Hadoop / Big Data / DWH Tester.

--->>cat>/home/prabhucloudxlab/prabhu/input2.txt
Hai this is prabhu
Hai this is manyam
Hai this is prabhu
Hai this is taraka
I am looking for an ETL / Hadoop / Big Data /DWH Testing profile job..
Please let me know if you have any openings regarding ETL / Hadoop / Big Data / DWH Tester.



#Script

#! bin/bash

ls /home/prabhucloudxlab/prabhu/*.txt | awk '{print $1}'>file_names.txt
file_name="$(<file_names.txt)"
sleep 2
echo "                                                        "

#------------------------------------------------------>>count lines in file1st method<<------------------------------------------------------#

#Count By using WC

for file1 in $file_name;
do
echo " File name is:"$file1; echo "and Count is: "; 
wc -l < $file1;
echo "                                                        "

echo "Count lines in $file1 are: "
cat $file1 | wc -l
echo "    


#Count By using FIND 
echo "By using Find Command : Count_$file1:" 
find $file1 | xargs wc -l
echo "                                                        "

#Count By using GREP 
echo "Count lines in $file1 are: "
grep -c ^ $file1
echo "                                                        "

#Count By using CAT
"c=`cat $file1 | wc -c`
echo Number of characters in $file1 is $c
echo "                                                        "

w=`cat $file1 | wc -w`
echo Number of words in $file1 is $w
echo "                                                        "

echo "==============================================================="
done



OUTPUT:

[prabhucloudxlab@cxln4 ~]$ sh sh4.sh

 File name is:/home/prabhucloudxlab/prabhu/input2.txt
and Count is:
7

By using Find Command : Count_/home/prabhucloudxlab/prabhu/input2.txt:
7 /home/prabhucloudxlab/prabhu/input2.txt

Count lines in /home/prabhucloudxlab/prabhu/input2.txt are:
7

Count lines in /home/prabhucloudxlab/prabhu/input2.txt are:
7

Number of characters in /home/prabhucloudxlab/prabhu/input2.txt is 241

Number of words in /home/prabhucloudxlab/prabhu/input2.txt is 50

===============================================================
 File name is:/home/prabhucloudxlab/prabhu/input.txt
and Count is:
7

By using Find Command : Count_/home/prabhucloudxlab/prabhu/input.txt:
7 /home/prabhucloudxlab/prabhu/input.txt

Count lines in /home/prabhucloudxlab/prabhu/input.txt are:
7

Count lines in /home/prabhucloudxlab/prabhu/input.txt are:
7

Number of characters in /home/prabhucloudxlab/prabhu/input.txt is 233

Number of words in /home/prabhucloudxlab/prabhu/input.txt is 50

===============================================================