Q:

Rename specific level of sub folders

I have list of sub folders inside a parent folder as follow:
Parent folder
    folder1
       foldera
    folder2
       folderb
    folder3
       folderc

I want to rename the subfolders only in the second level by removing the last two charcters in the subfolder name how can I do this? I tried something like 
find . -depth -type d -exec sh -c 'mv "${0}" "${0%??}"' {} \; 

but it didn't work.

A:

No need for find, it works with pure bash, considering the following directory structure:
./folder3
./folder3/folderc
./folder2
./folder2/folderb
./folder1
./folder1/foldera

The command:
for f in folder*/*/; do mv -v "$f" "${f%???}"; done

After:
./folder3
./folder3/folde
./folder2
./folder2/folde
./folder1
./folder1/folde

The filename expansion matches here only folders within the subfolder; folder*/*/, that's why there is a slash at the end. The mv command remove the last two characters, in the case above it's 3 characters because the ending slash also counts in the variable value.

