Renaming a File with Current Date
Posted: Tue Feb 27, 2007 2:41 pm
Hi All,
I asked this Question a week ago and I got a partial solution.
My ETL job creates a external table as Emp.txt in Netezza server. The requirement is this Emp.txt should be named like Emp022707.txt(it should have current date appended to it). Earlier I got a solution from this forum where in I tried with
cp Emp.txt Emp`date +%m%d%y`.txt
using this logic, I am able to copy the file with new name as 'Emp022707.txt?'....I am not sure why that question mark is coming along. Moreover I am not able to access that new file. Can anyone help me to write a script which can be called from ETL job which does the renaming? I am getting the same problem with 'mv' command too.
Thanks in Adance
I asked this Question a week ago and I got a partial solution.
My ETL job creates a external table as Emp.txt in Netezza server. The requirement is this Emp.txt should be named like Emp022707.txt(it should have current date appended to it). Earlier I got a solution from this forum where in I tried with
cp Emp.txt Emp`date +%m%d%y`.txt
using this logic, I am able to copy the file with new name as 'Emp022707.txt?'....I am not sure why that question mark is coming along. Moreover I am not able to access that new file. Can anyone help me to write a script which can be called from ETL job which does the renaming? I am getting the same problem with 'mv' command too.
Thanks in Adance