Please I am new to Unix and this simple question I am already answered but struggling to find the answer.
I have a data file which contains header record which conatins date timestamp. I need to find a way of simply updating the date time stamp to current date timestamp.
So if the header record is:
20081206 then I simply want to update it to 20081207 (i.e. today's date).
I would appreciate if someone can either point me to the related link or simply answer the this question by providing simple code. Note I would add this code to an existing shell script.
Sorry I forgot to mention the date in the header record is in dd-mmm-yyyy format e.g. 12-Sep-2008 and there are data records which contain date in the format dd-mm-yyyy e.g. 21-07-2005. So I need to change the date in the header record only.