I have a few files waiting to be processed by a daily cron job:
file1
file2
file3
I want the job to take the first file and then rename the rest. file1
should be deleted. file2
should be renamed to file1
, and file3
should be renamed to file2
.
I'm looking for a solution that would work with any number of files.
Is there a simple way to do this with a script? Or, taking a step back, is there a standard Linux technique for handling a queue of files?
batch
from your script to schedule the processing of the rest of the files?