File organization via bash script for Debian Linux server

Job ID: 34930888

Budget: $10 – $30 USD

I have a general directory where files are archived:

/reporting/reports/archive/

In that directory, multiple files names exist in the format of:

*-report-YYYY-MM-DD_HH-MM-SS.pdf

I need a bash script that will make subdirectories as needed in order to file all files of the same date into the same subfolder, with the directory structure like this:

/reporting/reports/archive/YYYY/MM/DD/

The bash script will be run once daily via cron.

Thanks!
Related categories: Linux Shell Script