now problem is this that in this case the date was 24th december 2006 but that file has new name everyday ( the date portion changes ) , how can i ammend above given line to work like that it gets date from system and then put it in above line .. so that i dont have to change this text every day ..
i hope i m making myself clear . if not kindly lemme know
thanks in advance and waiting for any help
Why not assign the system date time to a variable like in the example below.
TIME_SEC=`date +-%Y-%m-%d-%H%M` gives you -2007-01-09-1043
TIME_SEC=`date +%Y%m%d%H%M` gives you 200701091044
You can then use the variable $TIME_SEC in your script.
Hope this helps.