I am trying to achieve this using bash
I have a directory of files, a sample to get the picture is below:
January 2010 MA - C3 Edexcel.pdf January 2010 MS - C3 Edexcel.pdf January 2010 QP - C3 Edexcel.pdf January 2011 MA - C3 Edexcel.pdf January 2011 MS - C3 Edexcel.pdf January 2011 QP - C3 Edexcel.pdf
I am looking for a command that will take the three files from each year and put it into a folder for that year, for example, the first three files should go into a folder called 2010 and the second group of three files should go into a folder called 2011.
So what I am trying to do is
mkdir 2010| mv *2010* 2010
For every year in the file
To be clear, the folder is much larger than what I showed, meaning doing it year by year would take too much time
Is this possible?