![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| An Introduction to Real-Time Data Integration | iBot | Oracle Updates (RSS) | 0 | 04-06-2008 02:10 AM |
| Get real value from real-time systems | iBot | Complex Event Processing RSS News | 0 | 01-13-2008 10:10 PM |
| Error Message: find: cannot open /: Stale NFS file handle | ezsurf | SUN Solaris | 1 | 10-11-2007 05:04 PM |
| Open Source Is Dead, Long Live Open Patents? - InformationWeek | iBot | UNIX and Linux RSS News | 0 | 07-13-2007 11:00 AM |
| EPOCH to real time? | TheEngineer | UNIX for Advanced & Expert Users | 5 | 07-18-2006 05:30 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
Piped open not real-time - How would one handle live data?
When I run "/etc/myApp" I am presented with continuous output, just about once per second.
However when I try to get the information in Perl via a piped open, it waits till the end to give me anything... my code: Code:
open (OUTPUT,"/etc/myApp |");
while (<OUTPUT>){
print $_;
}
close (OUTPUT);
I know that I can solve my particular problem by just pushing STDOUT to a temp file, and then parsing it... but I would prefer to learn how to handle "live" data |
| Forum Sponsor | ||
|
|
|
|||
|
I just changed my code to this:
Code:
my @lines = split(/\n/, `/etc/myApp`);
print join("\n", @lines);
|
|||
| Google The UNIX and Linux Forums |