Script for File Details in your current Directory

using this Script you can see  File Details in your current Directory </p>

#!/bin/bash
echo "No of files in current in Directory"
ls -l | grep ^- | wc -l

echo "and there detail are  as follows"
#echo " File name No of lines word Characters"
for j in `ls -l | grep ^- | awk '{print $9}'`
do
wc -lmw $j | awk '{print  "File name is"" "$4"\t""No Of lines  in that file"" " $1"\t" "No Of Words in that file" " " $2 "\t" "No of Character in files"" "$3  }'
done

If you are using Ubuntu linux make change in file  for j in `ls -l | grep ^- | awk '{print $8}'`

comments powered by Disqus