J
Jon Landenburer
We have these large files which are compressed. I need to read the
first 50 lines and make various calcs. In sh I been doing
zcat dog.Z |head -n50 > dog.dat
In perl I been gettuing broken pipes. I get all of the data but I get
a message (stderr)
dog: Broken pipe
to isolate the probelm I wrote
@temp = `zcat $filename | head -n50|`;
print @temp;
print "wait\n"; $C= <STDIN>;
it will sit for about 30 seconds then give that message .
I will get similar results if I do
open (scnfile, "zcat dog.z|") or die...
while ($line = <scnfile>) {
if ($i++ > 50 ) {last;}
}
print "wait\n"; $C= <STDIN>;
same thing happens. a pause of 30 secs then the message dog:
broken pipe
Why and where I dont know.
Any ideas?
In perl I been did
open (scnfile, "zcat dog.Z |head -n50 |") or die ....
while ($line = <scnfile>){
.......
}
close file;
get next file ......
when I do this it completes the first file, shows the calce but then
displays a message (stderr)
dog: Broken pipe
so then I replaced the open ,read,close with a simpler
@lines = `zcat dog.Z |head -n50 `;
and still get the same thing.
Its a harmless thing but worrysome.
the zcat in sh gives no broken pipe
first 50 lines and make various calcs. In sh I been doing
zcat dog.Z |head -n50 > dog.dat
In perl I been gettuing broken pipes. I get all of the data but I get
a message (stderr)
dog: Broken pipe
to isolate the probelm I wrote
@temp = `zcat $filename | head -n50|`;
print @temp;
print "wait\n"; $C= <STDIN>;
it will sit for about 30 seconds then give that message .
I will get similar results if I do
open (scnfile, "zcat dog.z|") or die...
while ($line = <scnfile>) {
if ($i++ > 50 ) {last;}
}
print "wait\n"; $C= <STDIN>;
same thing happens. a pause of 30 secs then the message dog:
broken pipe
Why and where I dont know.
Any ideas?
In perl I been did
open (scnfile, "zcat dog.Z |head -n50 |") or die ....
while ($line = <scnfile>){
.......
}
close file;
get next file ......
when I do this it completes the first file, shows the calce but then
displays a message (stderr)
dog: Broken pipe
so then I replaced the open ,read,close with a simpler
@lines = `zcat dog.Z |head -n50 `;
and still get the same thing.
Its a harmless thing but worrysome.
the zcat in sh gives no broken pipe