Hi,
To all the Unix gurus this should be a simple task, but as a newbie I'm finding it hard to crack this. Any help is highly appreciated...
Scenario:
Step 1 : Move zip file from FTP folder to WORK folder
Step 2:
Unzip the file "Sample_YYYYMMDDHHMMSS.tar.gz" which contains many file like a) Sample1.del
b) Sample2.del
c) Sample3.del etc...
Step 3: Rename all extracted files to
a) Sample1_YYYYMMDDHHMMSS.del
b) Sample2_YYYYMMDDHHMMSS.del
c) Sample3_YYYYMMDDHHMMSS.del
Thanks spacebar for the prompt reply, but I think I didn't explain the requirement properly. The "YYYYMMDDHHMMSS" part of the Zip file name is kind a hard coded and we should use that value to rename all the file inside it.
Secondly the files inside the Zip file does not follow any pattern for example it may not be "sample1.del" and "sample2.del" but can be "abcd.del" and "nmhs.del"
It does that because there are no files ending with .del in the current path. When that happens, the filename is taken literally as "*.del" instead of expanding into a list of filenames.