|
Author |
Message |
<tan... #1 / 4
|
 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 |
|
 |
John W. Krah #2 / 4
|
 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 |
|
 |
Ian Boreh #3 / 4
|
 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 |
|
 |
Ilja Tabachni #4 / 4
|
 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 |
|
|
|