You can always add a check inside the loop. Something like:
Code:
for .....; do
EXT="${file##*.}"
if [[ ! "$EXT" == ".sh" ]]; then
... your code ...
else
echo ".sh file detected"
fi
done
Note that the string mangling stuff ${...##.*} is a bashism (bash-only stuff), just keep that in mind. If you need to port this to some other shell some day you will need to use something like sed to do that instead.