Search for 'foo=' in all *.png files under current directory without descending into *.gif and *.svn directories
find . -name "*.png" -prune -o -name "*.gif" -prune -o -name "*.svn" -prune -o -print0 | xargs -0 -I FILES grep -IR "foo=" FILES