Code:
#!/bin/sh
for dir in ./*; do
if [ -d "$dir" ]; then
for file in "$dir"/*; do
if [ -f "$file" ]; then
printf "do something with %s\n" "$file"
fi
done
fi
done
A bit twisted, for my taste. The mentioned find and the given link are probably more clear. I used file as a varname to make it clear what is a file and what a folder, else i avoid such.
To put it short: it is a proposal, not well tested and not much thoughts on drawbacks of it.