change permissions for specific file types linux

C++
-R, --recursive

chmod -R 755 /path/to/directoryfind . -name "*.sh" -exec chmod +x {} \;
Source

Also in C++: