I’m new to ubuntu and also to the programming world, and I don’t really know how to do this!
I have a folder with lots of files named as follows:
Let’s say xxx_S_xxx is the principal name, and the rest of the file’s name gives secondary information (let’s call it secondary name).
I would like to find a specific name into the secondary name and make a folder with this name (for example mpc, dtd or flf), then make subfolders named as the principal name of each file and into those folders put the respective files.
Probably an image will explain better what I’m trying to say.
So for example, the output for the names I gave you above would be look like this:
Is this possible to do from the terminal?
I would appreciate your help.
My OS is Ubuntu 20.04 LTS