open(S,"|tee");# broken 
Author Message
 open(S,"|tee");# broken

#!/usr/bin/perl
open (STDOUT, "| tee file1 file2 file3") or die "Teeing off: $!\n";
print "whatever\n"                       or die "Writing: $!\n";
close(STDOUT)                            or die "Closing: $!\n";
exit;

on solaris 2.6, this script doesn't print anything to terminal or to file1,
file2 or file3.

"echo abc |tee /tmp/,31 " works.



Mon, 17 May 2004 15:52:31 GMT  
 open(S,"|tee");# broken

Quote:

> #!/usr/bin/perl
> open (STDOUT, "| tee file1 file2 file3") or die "Teeing off: $!\n";
> print "whatever\n"                       or die "Writing: $!\n";
> close(STDOUT)                            or die "Closing: $!\n";
> exit;

> on solaris 2.6, this script doesn't print anything to terminal or to file1,
> file2 or file3.

> "echo abc |tee /tmp/,31 " works.

This works on my system (Linux).  Are you getting any error messages?
Anything in syslog?  Try adding "use strict;", "use warnings;" and "use
diagnostics;" and see if that helps.

John
--
use Perl;
program
fulfillment



Tue, 18 May 2004 01:07:08 GMT  
 open(S,"|tee");# broken

Quote:

> #!/usr/bin/perl
> open (STDOUT, "| tee file1 file2 file3") or die "Teeing off: $!\n";
> print "whatever\n"                       or die "Writing: $!\n";
> close(STDOUT)                            or die "Closing: $!\n";
> exit;

> on solaris 2.6, this script doesn't print anything to terminal or to file1,
> file2 or file3.

Works for me. What version of perl are you using?

Quote:
> uname -a

SunOS stonehenge 5.6 Generic_105181-21 sun4u sparc SUNW,Ultra-Enterprise

Quote:
> tee.pl              

whatever

Quote:
> less file1

whatever

Quote:
> less file2

whatever

Quote:
> less file3

whatever

Quote:
> perl -v

This is perl, v5.6.1 built for sun4-solaris
...


Tue, 18 May 2004 09:55:13 GMT  
 open(S,"|tee");# broken

Quote:

> #!/usr/bin/perl
> open (STDOUT, "| tee file1 file2 file3") or die "Teeing off: $!\n";
> print "whatever\n"                       or die "Writing: $!\n";
> close(STDOUT)                            or die "Closing: $!\n";
> exit;

> on solaris 2.6, this script doesn't print anything to terminal or to file1,
> file2 or file3.

Looks functional on my Solaris box:

$ uname -a
SunOS xxx 5.6 Generic_105181-23 sun4u sparc SUNW,Ultra-Enterprise
$ perl -v
This is perl, version 5.005_03 built for sun4-solaris

Ilja.



Tue, 18 May 2004 15:57:37 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Problems with "tee"

2. "Tee" question

3. PL19 bug: printf("-6.4s"...) broken

4. Problem with an unexpected "broken pipe"

5. "perldoc" broken in Solaris 8

6. IO::Socket "Broken pipe" crashes script

7. "Broken pipe"

8. HowTo "break" and ?: operator

9. Using Modules Breaks "-w"?

10. win95 perl install "broke" internet connection

11. "character class ""bug""

12. open(PROC, "|proc >&FD")

 

 
Powered by phpBB® Forum Software