Hi,
I have a ksh which peocess and get me data from 3 days...
ie if i process it on jan 28.. it gets data for 25, 26 and 27.... the process run every day and get previous 3 days data...all this data is appened to a file lets call time.out
Now time.out cannot have deplicate data so what i want is when ever the appeneding is done i want look for the date in the file if it matches with the date the data is holding then i want it to be replace with new data
the time.out is like this
.
.
20090124,00:02:31,00:00:11,2776,00:01:38,00:01:31,00:56:36,108938,
20090125,00:02:31,00:00:11,2776,00:01:38,00:01:31,00:56:36,108938,
20090126,00:02:33,00:00:35,8187,00:01:42,00:01:32,02:02:08,321055,
while in the script we have the current data for which the process is running save in CUR_MAINT_DATE..
the way the output file is written is
Read.ksh `basename ${0}` $1 $2 ${CUR_MAINT_DATE} > runtime.out
echo >> time.out; tr -d '\n' < runtime.out >> time.out
The the script runs it initially get data of 25 ... now i want the script to cross check with the time.out file if the data is already present for that date then it have to replace that line with the data in runtime.out.... and so on till it comes to current maintaince date 27 as no data is there for 27 in time.out the script have put it in the time.out
can anyone say me how i can replace the data in output file with data form input