
for i in `find . -perm -111 -print`; do
   if [ -f $i -a x`grep -c -F '#!' $i 2>/dev/null` = x0 ]; then
      if [ x`file $i | grep -c ELF` = x0 -a \
           x`file $i | grep -c script` = x0 ]; then
         chmod a-x $i
      fi
   fi
done

find . -name 'Makefile*' -exec chmod a-x {} \;

find . -name '*.mak' -exec chmod a-x {} \;

