Search Results

Search: Posts Made By: James_Owen
1,522
Posted By James_Owen
The code I have is not doing what is should do...
The code I have is not doing what is should do the print is not printing to the output file and the 2 minute loop doesn't work at all.

@knight_eon

The section of the code is not working for...
1,522
Posted By James_Owen
Please Help with AWK to parse rapidly changing XML messages
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...
8,255
Posted By James_Owen
@methyl, Thank you for replying, this...
@methyl,

Thank you for replying, this printf is not doing what is should have done.


awk 'BEGIN { INTERVAL=120; "date +%s"|getline sec;
NEXT=sec+120;}

{
if(sec >=...
8,255
Posted By James_Owen
Guy's I don't want to bump my thread but...
Guy's

I don't want to bump my thread but can I please get help with this problem.

Thanks

James
8,255
Posted By James_Owen
Guys, One more this, i want to get the...
Guys,

One more this, i want to get the current date to be included in the input-file.

I have made this changes in blue to the code


for( x in agcount )
printf(...
8,255
Posted By James_Owen
Thank you ahamed101 :b: I have made the...
Thank you ahamed101 :b:

I have made the changaes as follows:

awk 'BEGIN { INTERVAL=120; "date +%s"|getline sec;
NEXT=sec+120;}

{
if(sec >= NEXT)
{
...
8,255
Posted By James_Owen
@Corona688 Thank you a lot. But I only have...
@Corona688 Thank you a lot.

But I only have one more problem with the strftime function. :o

I know strftime is a GNU gawk extension, which I can't use.

Every time I run the script I get...
8,255
Posted By James_Owen
This file was created using this code (your code)...
This file was created using this code (your code)


while true
do
cat /path/to/output
done > logfile
I am sure if I am following what you saying , I have tried everything you said.

...
8,255
Posted By James_Owen
I think I am confusing myself and confusing you...
I think I am confusing myself and confusing you with me too.

This what I have so far

Files


data.ksh --> which contains data


29203 --> file which I use to capture the data from...
8,255
Posted By James_Owen
By solution you mean the AWK code, also what do...
By solution you mean the AWK code, also what do you mean by "after fixing the capitalised words?" do you mean the headings for the outputs? Or what?

Still I am not sure steps that I need to do in...
8,255
Posted By James_Owen
@Corona688, Yes it does work and yes it...
@Corona688,

Yes it does work and yes it does capture the data.

:confused:
8,255
Posted By James_Owen
@Corona688 , You asked what I want. I want an AWK...
@Corona688 , You asked what I want. I want an AWK code which parse xml message and produces an out to output file every minute:

Message example

[date+time], message=[DATA= “<?xml...
8,255
Posted By James_Owen
Unix tee command looks interesting, except one...
Unix tee command looks interesting, except one question to be able to use this command I will need to have a output file to stores all my outputs then using the tee command process this file.

Am...
8,255
Posted By James_Owen
Is more like what is it not doing? Your...
Is more like what is it not doing?

Your suggestion of fifo is allowing to create a back up file which will store data and allows me to keep the data and process it which is not what I am after....
8,255
Posted By James_Owen
Hey Guy's I have tried to use fifo but no luck,...
Hey Guy's I have tried to use fifo but no luck, is not doing what I want to get.



@ methyl



I not sure is I understand your question correctly, Will PERL be better choice than AWK....
8,255
Posted By James_Owen
Hi Corona688 , Yes I am looking on First In,...
Hi Corona688 ,

Yes I am looking on First In, First Out approach but not sure how to add it to my script.

Do I require to rewrite the again to add the fifo to it?
8,255
Posted By James_Owen
Yes, data in the file is temporary and I need to...
Yes, data in the file is temporary and I need to capture these data as soon as it arrives.

All I require is to check the current time and capture all the data for that minute.



I am new to...
8,255
Posted By James_Owen
The only problem with this is the data in only...
The only problem with this is the data in only stored in the file for couple seconds and I need to process it as soon as data arrives. Meaning old data is deleted and replaced by new.
8,255
Posted By James_Owen
Process file every minute
Hey guy's,

How can I schedule this script using AWK, what I require is it runs every minute as new data will be added to the file? And I need to capture these data and save it to the output file....
10,338
Posted By James_Owen
Thank you BeefStu, The problem was with the...
Thank you BeefStu,

The problem was with the file permission, but is there a way to change output file permission within the the code.


chmod 777 the output file within the code.
10,338
Posted By James_Owen
How to execute korn shell script from different directory
Guy's ,
I need to run korn shell script from different directory, usually I run the script using ./details.ksh in the same directory but now I need to run the file and process details using awk...
2,142
Posted By James_Owen
Awk,nawk Help please
Hay guys,

Is there a way to only get the
Gender , age and age count

Because I don't need two counts, all I need is to get the details then gender, age and count of the age.*

For example
...
3,227
Posted By James_Owen
AWK to Parse XML messages
I can see what MS Word did with double quotes, I have changes them now and added the date and time stamps.



[08-11-2011 13:40:12], message=[DATA= "<?xml version="1.0?"><data...
3,227
Posted By James_Owen
AWK to Parse XML messages
Of course it has been through MS Word, this is only a sample of the messages and secondly i have removed the date and the time.
So this have been edited on MS Word
3,227
Posted By James_Owen
AWK to Parse XML messages
No this is how the data really looks like
Showing results 1 to 25 of 28

 
All times are GMT -4. The time now is 04:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy