I am trying to find the number of files with executable permission by the owner. I am doing this but giving me error
cmd> ls -la /myScript.sh
myScript.sh is the following
z=0
while read line
do
#for total lines read
#wc -l
#total unique user
#top three largest directory
#for total executables
for i in $(echo $line | sed -n '/^-rwx/p'| wc -l)
do
#echo $i #process in this if-then filter out 0 and sum non-zero
if [$i -ne 0]
then
echo $i
# $(z=z+i)
fi
done
done
echo "Total executable files by owner $z";
find
command, look for the-executable
flag.