Manual Script to Delete Released Artefacts similar to Scheduled Task in NXRM2

Good afternoon,

I am looking for a script (preferably Bash) that will assist me in identifying released artefacts, the same way that the scheduled task for removing of released artefacts from Nexus Repo Manager 2.

But instead of removing I need to scp the artefact folders over to a remote server.

Thanks in advance for any advice or suggestions.

Kind regards