Have lot of directories like the following
./parent/inventory_control-8118c470fa3811ed9add1fef7e5ef70f/snapshots/automation
./parent/configuration_data-6be54fa0fa3e11ed9add1fef7e5ef70f/snapshots/automation
./parent/zip_code-940ac1d0fa3f11ed9add1fef7e5ef70f/snapshots/automation
I would like to rename the directories by removing hypen and uuid from the directory name. The desired output is
./parent/inventory_control/snapshots/automation
./parent/configuration_data/snapshots/automation
./parent/zip_code/snapshots/automation
Can you please suggest a one line command to find all the directories and rename them? or a bash script as well can help.