I want to have the following run as a cron job:
Code:
/*** Plain english rundown of job ***/
for (every file in In ~/INBOX/.SPAM/cur){
oldFilename = the current filename
if(oldFilename does not end in :2,S){
newFilename = oldFilename + ":2,S"
rename the current filename as newFilename
}
}
/*** End plain english rundown ***/
How would I do this? Is this a job for grep? Whatever I settle on, I will want to enter it as a crontab for the user. A Perl script that is put into /etc/cron.hourly would also work, I suppose. (I've never done anything like that before.)
Any help appreciated. Thanks!