Not sure how to do the following, but any help would be appreciated.
Has to be done using C shell (sorry about that).
I have about 300 files that I need this done for, but I am only going to give one example. I will just need to know how to execute your solution through some type of loop to get all three files.
I have a file named aaa.ccyymmdd.dat.gz.
I need to copy that file to a new name, but take the ccyymmdd out of the original filename and put it into the name of the new filename.
Final output would be xyz.ccyymmdd.dat.gz.
Example:
I have files:
aaa.20110101.dat.gz
aaa.20110401.dat.gz
aaa.20110701.dat.gz
aaa.20111001.dat.gz
and need to run something that will ls or list all the files, loop through them, copy the file over BUT name it:
xyz.20110101.dat.gz
xyz.20110401.dat.gz
xyz.20110701.dat.gz
xyz.20111001.dat.gz
MY BIGGEST CONCERN IS HOW TO SETUP THE LOOP.
Any help would be greatly appreciated.
Thanks.