HI Guy's
Can I please get some help with this code.
I have xml feed file which rapidly changing temporary file and I need to capture the content of this file as soon as data arrives.
Example of the data
[date+time], message=[DATA= "<?xml version="1.0?"><data changeMsg><NAME="John...
@tarn, thank you this is a good place to start, but the problem is that i need to do some counts like the ones in my sample output.
8:30,Male,23,1
8:31,Female,23,1
8:32,Female,30,4
8:33,Male,50,10
Also I am not sure where you parsing the xml messages in this code, can you please help with...
This part of my code should be the part which is pausing the code for 2 minutes and also does the counting.
awk 'BEGIN { INTERVAL=120; "date +%s"|getline sec;
NEXT=sec+120;}
{
if(sec >= NEXT)
{
printf( "\nSummary\n" );
for( x in agcount )...
Guy’s
Thanks for helping.
I have tried your suggestions, the only problem is that still I can’t loop only for 2 minutes them pause the process to write to another file then start from the same place again without processing the data that has been process already.
@tarn
Thank you for...
@Annihilannic
I have tried to use “tail -f” but the only problem with this is that as I get new data it will mean the old data is gone. This is rapid changing file that I need to process the data as soon as it arrives.
@tarn
I have tried to break the code into parts but still I am not getting...
Hi guys,
Thank you for the help.
@tarn
Yes messages will have a date and time stamp but time in the output example is current time meaning when ever the messages were processed.
I am new to programming, would please be able to help me with examples for steps 1 to 5.
Thanks
James
Every two minute should contain new data and it shouldn't process the old data again.
It shouldn't also process the entire file at once but only content of 2 minutes.
Date and time. Should be created within the process.
I have tried to put sleep 120 but it doesn't work.is this something you...
HI Guy's
Can I please get some help with this code.
I have xml feed file which rapidly changing temporary file and I need to capture the content of this file as soon as data arrives.
Example of the data
[date+time], message=[DATA= “<?xml version=”1.0?”><data changeMsg><NAME=”John...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.