I got one more similar requirement to rename a file by appending a value from other file. I know it would be a simple modification to these commands but my unix knowledge did not help me....Can you please show me a way to do this....
Say
File_Date.txt contain a value 20110710
Now, I want to rename a file File1.txt to File1_20110710.txt
Your help is much appreciated!!!
---------- Post updated 06-07-11 at 12:19 AM ---------- Previous update was 05-07-11 at 07:32 AM ----------
Hi.. Many thanks for the commands...
I got slight change in the requirement to rename a file by appending a value from other file. I know it would be a simple modification to these commands but my unix knowledge did not help me....Can you please guide me to do this....
Scenario....
File_Date.txt contain a value 20110710
Now, I want to rename a file File1.txt to File1_20110710.txt
File_Date.txt will have only one date value in the format YYYYMMDD
ex.,
20110706
I need to append this date to the name of other file already exists in the directory.
ex.,
File_Date.txt
File1.txt
I need to read the content(date value in yyyymmdd) from File_Date.txt and rename File1.txt by appending the date value, which should look like File1_20110706.txt