I think I am confusing myself and confusing you with me too.
This what I have so far
Files
Quote:
Does the input refer to the fifo? And have you tried?
I could read the data from 29203 file through outputfile.
If I cat 29203 > outputfile then from second terminal cat outputfile then I could refer to the data.
Other than that I can't refer to the data using fifo file directly and reading about fifo it says that size of pipe is always zero as it does not store data.
One more thing , now if I refer the data through fifo which is basically reading data from the 29203 file then wouldn't this mean fifo will process the file from the beginning every time the script runs. If yes then it will mean I will have duplicate results.
I think I am confusing myself and confusing you with me too.
You have code that looks like it could work if you tried it but refuse to try it.
Quote:
data.ksh which contains data
So you have a .ksh file which is not a ksh script?
Quote:
29203 file which I use to capture the data from data.ksh
Created how?
Quote:
If I cat 29203 > outputfile then from second terminal cat outputfile then I could refer to the data.
So this 29203 is the fifo?
Quote:
Other than that I can’t refer to the data using fifo file directly
Yes you can. 'cat' is not special, cat just reads files. awk also just reads files. Why not try it, like I've asked for days?
Just awk ... /path/to/pipe ought to read one batch of data from the pipe and write it to standard output. Redirect it wherever you please with >filename (to replace) or >>filename (to append). Put it in a 'while true' loop like you already did. each time you run awk it will get exactly one batch of data.
In other words run the code I already got and suggested fixes to, the way you had it originally, except reading from the fifo. And actually try it to see what it does.
Please try it, or at least something. I can't see your computer from here and ran out of things to suggest days ago, we need actual feedback from you, not 'but I think x'.
29203 file which I use to capture the data from data.ksh
Created how?
This file was created using this code (your code)
Quote:
Yes you can. 'cat' is not special, cat just reads files. awk also just reads files. Why not try it, like I've asked for days?
I am sure if I am following what you saying , I have tried everything you said.
this will not only get one batch of the data but each time it will read the same data again and again.
Quote:
In other words run the code I already got and suggested fixes to, the way you had it originally, except reading from the fifo. And actually try it to see what it does.
I can't read from fifi as I said before using
Then using awk read from data file to fifo file.
Created a pipe and the size of pipe is always zero as it does not store data. I have tried to write to this file but can't write to the file.
Quote:
Please try it, or at least something. I can't see your computer from here and ran out of things to suggest days ago, we need actual feedback from you, not 'but I think x'.
I have tried everything you said and try to explain the results I got.
---------- Post updated 4th Jan 2012 at 05:14 PM ---------- Previous update was 3rd Jan 2012 at 11:40 PM ----------
Please ignore my last reply.
Going back to the pipe, now I have a pipe output file as shows below
Now I am also able to read from the data file and capture the data using the pipe.
Also using AWK code I can read from pipe to another file which stores the data. (Parsing xml)
But this continues process for example if there are 40 records in the pipe then the AWK code loops again and again without stopping and adding to the counts every time.
I tried using sleep 20 at the end oTf the code before done, but this doesn't make any difference.
Could anyone help with this?
Also if the connection between the pipe and the data file fails, will pipe keep unprocessed data be kept by the pipe until it gets process or will it clear the file?
All I want the script to do is to run for 2 minutes, do calculation for those 2 minutes then sleep for 20 seconds. After 20 seconds start again from the where it was last.
I am writing a script to kick off a process to gather logs on multiple nodes in parallel using "&". These processes create individual log files. Which I would like to filter and convert in CSV format after they are complete. I am facing following issues:
1. Monitor all Processes parallelly.... (5 Replies)
Hi All,
Need your help on how i can sum up the values. I have a file that contains the count and the time. I wanted to add up all the first column having the same datestamp. Please see below.
INPUT
1721 2015-12-26 00:01
1440 2015-12-26 00:02
1477 2015-12-26 00:02
411 ... (4 Replies)
How to check log size every 10min. by script (can use crontab)
if log size not change with alert "Log not update"
Base run on SunOS 5.8 Generic_Virtual sun4u sparc SUNW,SPARC-Enterprise
logFiles="log1.log log2.log"
logLocation="/usr/home/test/log/"
Out put.
Tue Jan 31... (3 Replies)
Hi, I've been trying to develop a script that performs the parsing of a log every 1 minute and then generating some statistics. I'm fairly new to programming and this is why I come to ask if I can lend a hand.
this is my log:
xxxx 16/04/2012 17:00:52 - xxxx714 - E234 - Time= 119 ms.... (8 Replies)
Anyone knows how to use AWK to achieve the following
Sun Feb 12 00:41:01-00:41:59 Success:2 Fail:2
Sun Feb 12 00:42:01-00:42:59 Success:1 Fail:2
Sun Feb 12 01:20:01-01:20:59 Success:1 Fail:2
Mon Feb 13 22:41:01-22:41:59 Success:1 Fail:1
log file:
Success
Success
Fail
Fail
... (9 Replies)
Hello All,
i am a newbie and need some help when reading a csv file in a bourne shell script. I want to read 10 lines, then wait for a minute and then do a reading of another 10 lines and so on in the same way. I want to do this till the end of file.
Any inputs are appreciated
... (3 Replies)
Is there a simple command to find or check if a file has been modified within the last minute? The mtime parameter from find cmd only allow days.
I am trying to avoid timestamp parsing and do some sort of comparison as I'm real beginner at scripts. If this is the only way, any help is greatly... (3 Replies)
here's the problem, i have two processes that i need to run and both process should be run at a total of 1 minute each. how do i do that? and one more here's what the processes do: the 1st process show the '+" sign infinitely while the 2nd process displays the "-" infinitely. how could i count the... (1 Reply)