Karyn Williams wrote:
> I have this script I have been working on where I need to redirect STDOUT
> and STDERR to files at the beginning of the script and then back to default
> (terminal) at the end of the script. I found an example on-line and used it
> and it works, however it generates a warnin
On 5/7/07, Karyn Williams <[EMAIL PROTECTED]> wrote:
I have this script I have been working on where I need to redirect STDOUT
and STDERR to files at the beginning of the script and then back to default
(terminal) at the end of the script. I found an example on-line and used it
and it works, how
On 5/7/07, Karyn Williams <[EMAIL PROTECTED]> wrote:
I have this script I have been working on where I need to redirect STDOUT
and STDERR to files at the beginning of the script and then back to default
(terminal) at the end of the script. I found an example on-line and used it
and it works, howe
I have this script I have been working on where I need to redirect STDOUT
and STDERR to files at the beginning of the script and then back to default
(terminal) at the end of the script. I found an example on-line and used it
and it works, however it generates a warning when running my script. I
wo
Hi list,
I've got some strange behaviour with redirected STDOUT/STDERR handles and
calls to File::Copy - I hope someone can explain me why I'm seeing what I'm
seeing here.
I use the following code to redirect STDOUT and STDERR to a log file - as you
can see, it's more or
From: "Larry Guest" <[EMAIL PROTECTED]>
> What I need to do now is not only have is display information to
> STDERR and STDOUT but also write the same information I see when I run
> the command to a file.
Strange you only got a few Unix-only solutions when there are at
least two modules that do t
I think I have it.
I had to have
close (STDERR)
close (STDOUT)
close (TEE)
-Original Message-
From: Larry Guest [mailto:[EMAIL PROTECTED]
Sent: Saturday, January 17, 2004 11:22 PM
To: 'Randal L. Schwartz'; [EMAIL PROTECTED]
Subject: RE: Redirect stdout, stderr to file and std
00:00:00 tee YourLogFileHere
I have a close (TEE); at the end as well.
Any thoughts?
Thanks
-Original Message-
From: Randal L. Schwartz [mailto:[EMAIL PROTECTED]
Sent: Saturday, January 17, 2004 9:55 AM
To: [EMAIL PROTECTED]
Subject: Re: Redirect stdout, stderr to file and stdout
> "Larry" == Larry Guest <[EMAIL PROTECTED]> writes:
Larry> I have a small script that does some admin work for me.
Larry> What I need to do now is not only have is display information to STDERR
Larry> and STDOUT but also write the same information I see when I run the
Larry> command to a file
On Fri, 16 Jan 2004, Larry Guest wrote:
> I have a small script that does some admin work for me.
>
> What I need to do now is not only have is display information to STDERR
> and STDOUT but also write the same information I see when I run the
> command to a file.
>
> I have written it for other
On Fri, Jan 16, 2004 at 05:02:52PM -0800, Larry Guest wrote:
> I have a small script that does some admin work for me.
>
> What I need to do now is not only have is display information to STDERR
> and STDOUT but also write the same information I see when I run the
> command to a file.
>
> I have
print @_;
print OUTFILE @_;
}
###
-Original Message-
From: Larry Guest [mailto:[EMAIL PROTECTED]
Sent: Friday, January 16, 2004 5:03 PM
To: [EMAIL PROTECTED]
Subject: Redirect stdout, stderr to file and stdout
What I need to do now is not only have is displ
hand out to the users to use is going to deal with
all of the STDOUT|STDERR as well a always sending
you the email...
ciao
drieux
---
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
I have a small script that does some admin work for me.
What I need to do now is not only have is display information to STDERR
and STDOUT but also write the same information I see when I run the
command to a file.
I have written it for others who are not very technical. I want them to
be able t
- Original Message -
From: isao <[EMAIL PROTECTED]>
Date: Tuesday, July 1, 2003 7:07 pm
Subject: stdout+stderr to file?
> I'm writing scripts that are basically wrappers for Linux shell
> commands.
> I want to be able to 1) print messages to screen along with say
&
I'm writing scripts that are basically wrappers for Linux shell commands.
I want to be able to 1) print messages to screen along with say the first
line of any STDERR, and 2) print messages, STDOUT, and STDERR to go to a
file.
The best I've come up with is something like the followng, which doesn
From: "Beau E. Cox" <[EMAIL PROTECTED]>
> I am developing a perl 5.8 application using the
> new threading model. I use this technique
> (thanks Jenda!) to dup STDIN to a temp file handle:
> ...
> open SAVIN, '<&STDIN';
> open (STDIN,'<&' . $tmpfh->fileno) or die "...";
>
"Beau E. Cox" <[EMAIL PROTECTED]>
To: "Mark Goland" <[EMAIL PROTECTED]>
Cc: "perl" <[EMAIL PROTECTED]>
Sent: Wednesday, January 15, 2003 1:27 PM
Subject: RE: How 'global' are STDIN/STDOUT/STDERR?
> Thanks Mark - I thought maybe that was the
eau E. Cox
> Cc: perl
> Subject: Re: How 'global' are STDIN/STDOUT/STDERR?
>
>
> Threads share U area , thats where file descripters are stored for your
> process. All threads are in one process. I sedjest using semaphors for
> contolling access to any resources.
&
" <[EMAIL PROTECTED]>
Sent: Wednesday, January 15, 2003 4:41 AM
Subject: How 'global' are STDIN/STDOUT/STDERR?
> Hi all -
>
> I am developing a perl 5.8 application using the
> new threading model. I use this technique
> (thanks Jenda!) to dup STDIN to a temp f
Hi all -
I am developing a perl 5.8 application using the
new threading model. I use this technique
(thanks Jenda!) to dup STDIN to a temp file handle:
...
open SAVIN, '<&STDIN';
open (STDIN,'<&' . $tmpfh->fileno) or die "...";
my $out = `some-command 2>&1`;
open STDIN, '<&SAVIN';
clos
my $FH;
if ($out) {
open $FH, '>&STDERR';
} else {
open $FH, '>&STDOUT';
}
print $FH "My message\n";
In the first two solutions when you change where the
STDOUT/STDERR goes, the STD
Angus Laycock wrote:
>
> Hi,
Hello,
> I want to print messages from a script to either
> STDOUT or STDERR depending on a value of a variable.
> I want to control where I send the print statements
> to. Can I do something like this or are there other
> ways to control the target I send my messag
Hi,
I want to print messages from a script to either STDOUT or STDERR depending on a value
of a variable. I want to control where I send the print statements to. Can I do
something like this or are there other ways to control the target I send my message
to. I'm hoping there are lots of other
From: Adriano Rodrigues Ferreira <[EMAIL PROTECTED]>
> When using FileHandles as the object-oriented wrapper for file
> handles, are there predefined handles which can be used to get the
> standard input, standard or standard error files?
>
> If they are not predefined, how I c
yep, you listed them in your subject line :-)
> -Original Message-
> From: Adriano Rodrigues Ferreira [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 30, 2002 10:37 AM
> To: [EMAIL PROTECTED]
> Subject: Standard FileHandles for STDIN, STDOUT, STDERR
>
>
> When using FileHandles as the object-oriented wrapper for
> file handles, are there predefined handles which can be
> used to get the standard input, standard or standard
> error files?
>
You mean like STDIN, STDOUT and STDERR filehandles? I
can't see many good reasons for wrapping these.
When using FileHandles as the object-oriented wrapper for file handles,
are there predefined handles which can be used to get the
standard input, standard or standard error files?
If they are not predefined, how I can create them?
Best regards,
Adriano.
--
To unsubscribe, e-mail: [EMAIL PR
OTECTED]]
> Sent: Thursday, October 25, 2001 9:50 PM
> To: 'Gupta, Ashish'; '[EMAIL PROTECTED]'
> Subject: RE: system() and STDOUT & STDERR
>
>
> Are you sure b.pl is running correctly? You aren't checking the return
> value
> of system()
> -Original Message-
> From: Gupta, Ashish [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, October 25, 2001 3:21 AM
> To: '[EMAIL PROTECTED]'
> Subject: system() and STDOUT & STDERR
>
>
> please help me solve another prob i am facing.
>
> i hav
the STDOUT, STDERR of the new
process are inherited from the parent process.
so, I expect that if I do not specify -logfile for b.pl but specify -logfile
for a.pl, then the output for b.pl should also go to the logfile for a.pl
but the output of b.pl is lost.
if I do not specify the logfile for eit
> I had another idea, but that is revert back to stupidity ;)
> using system and sending the output to a file then open the file ;)
Why not ? That's just fine
> What would be the easiest way to capture [stderr]?
One way:
$output = `$cmd 2>&1 1>$null`;
$null depends on the os; /dev/null on unix, /nul on an M$ OS.
Folks,
What would be the easiest way to capture time output?
that is the output from time -p ps -ef > /dev/null,
time prints it output on stderr. I was going to use qx()
but that will not work, seeing qx (to my knowledge) does not
catch stderr correct?
I had another idea, but that is revert back
34 matches
Mail list logo