I have a number of files
/u01/PROD/arch.PROD.1_1
/u01/PROD/arch.PROD.1_2
/u01/PROD/arch.PROD.1_3
I would like a simple method for moving/renaming them
/u01/TEST/arch.TEST.1_1
/u01/TEST/arch.TEST.1_2
/u01/TEST/arch.TEST.1_3
Note the only thing that changes is the PROD to TEST, in file and dir name.
I need to this in a script, so loops are fine, will be run via cron, the file numbers change daily. They will not always have the exact _1, _2, _3, this is an incremental number.
Any help?