Unix/Linux Go Back    



Adding date and time to file name

Shell Programming and Scripting




Kindly Note - This is a Single User Post by Forum Member cc_at_work Regarding:
Adding date and time to file name.
Please Follow The Primary Link Above to View the Full Discussion.

   
Old Unix and Linux 11-15-2010   -   Original Discussion by cc_at_work
cc_at_work cc_at_work is offline
Registered User
 
Join Date: Nov 2010
Last Activity: 12 January 2011, 8:20 PM EST
Posts: 4
Thanks: 2
Thanked 0 Times in 0 Posts
yea thankx for reply.. but yea that i could figure out but the main part is.

Code:
mv $i ${i%.txt}$(date "+_%Y%m%d.txt")"

here i have hard coded .txt.. that is what i want to change..

Last edited by Scott; 11-15-2010 at 02:50 AM.. Reason: Code tags