I am trying to build a condition that check if file has execute access bit set. I can't use grep and find.
I tried something with checking the "x" letter in the ls -l
command but this is wrong in many cases.
for val in `ls $1`
do
if [[ "`ls -l $1/$val`" -eq *w* ]]
then
rm $1/$val
fi
done
Please help or give some advices!