#!/bin/sh for f in $(find . -iname '*.sh' -type 'f'); do if ! [ -x $f ]; then echo "fixing $f..." chmod +x $f fi done