I have following folder structure:
/[randomChars]/icons/icon_[randomNumbersAndChars]
For example:
/awbwaidhawd/icons/icon_1241245
/awbwaidhawd/icons/icon_1552542
/awgawbvbbbb/icons/icon_1552542
/aawbbbbbbbb/icons/icon_1161266
I need to grab all icon files recursively, add the file extension ".png" to them and copy them to another folder.
That means I want to achieve following result:
/icon_1241245.png
/icon_1552542.png
/icon_1552542.png
/icon_1161266.png
For that I want to use standard bash linux scripting.
How could you achieve that?
EDIT:
Maybe I should add that there are more subfolders in the first layer that are not important. That means there exsists for example a folder like:
/awbwaidhawd/avatars/
Such folders should not be scanned.
Additionally, in a "icons" folder there can be files that are not named "icon_xxxxx". Those files should not be moved too.