Re: Redirecting STDOUT & STDERR

2007-05-07 Thread John W. Krahn
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

Re: Redirecting STDOUT & STDERR

2007-05-07 Thread Tom Phoenix
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

Re: Redirecting STDOUT & STDERR

2007-05-07 Thread Adriano Ferreira
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

Redirecting STDOUT & STDERR

2007-05-07 Thread Karyn Williams
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

redirecting STDOUT/STDERR and File::Copy

2005-03-02 Thread Traeder, Philipp
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

Re: Redirect stdout, stderr to file and stdout

2004-01-20 Thread Jenda Krynicky
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

RE: Redirect stdout, stderr to file and stdout

2004-01-18 Thread Larry Guest
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

RE: Redirect stdout, stderr to file and stdout

2004-01-18 Thread Larry Guest
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

Re: Redirect stdout, stderr to file and stdout

2004-01-17 Thread Randal L. Schwartz
> "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

Re: Redirect stdout, stderr to file and stdout

2004-01-16 Thread John McKown
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

Re: Redirect stdout, stderr to file and stdout

2004-01-16 Thread Paul Johnson
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

RE: Redirect stdout, stderr to file and stdout

2004-01-16 Thread Tim Johnson
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

Re: Redirect stdout, stderr to file and stdout

2004-01-16 Thread drieux
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>

Redirect stdout, stderr to file and stdout

2004-01-16 Thread Larry Guest
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

Re: stdout+stderr to file?

2003-07-02 Thread mgoland
- 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 &

stdout+stderr to file?

2003-07-02 Thread isao
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

Re: How 'global' are STDIN/STDOUT/STDERR?

2003-01-19 Thread Jenda Krynicky
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 "..."; >

Re: How 'global' are STDIN/STDOUT/STDERR?

2003-01-15 Thread Mark Goland
"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

RE: How 'global' are STDIN/STDOUT/STDERR?

2003-01-15 Thread Beau E. Cox
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. &

Re: How 'global' are STDIN/STDOUT/STDERR?

2003-01-15 Thread Mark Goland
" <[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

How 'global' are STDIN/STDOUT/STDERR?

2003-01-15 Thread Beau E. Cox
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

Re: STDOUT & STDERR

2002-02-18 Thread Jenda Krynicky
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

Re: STDOUT & STDERR

2002-02-16 Thread John W. Krahn
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

STDOUT & STDERR

2002-02-16 Thread Angus Laycock
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

Re: Standard FileHandles for STDIN, STDOUT, STDERR

2002-01-30 Thread Jenda Krynicky
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

RE: Standard FileHandles for STDIN, STDOUT, STDERR

2002-01-30 Thread Kipp, James
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 >

Re: Standard FileHandles for STDIN, STDOUT, STDERR

2002-01-30 Thread Jonathan E. Paton
> > 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.

Standard FileHandles for STDIN, STDOUT, STDERR

2002-01-30 Thread Adriano Rodrigues Ferreira
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

RE: system() and STDOUT & STDERR

2001-10-25 Thread Gupta, Ashish
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()

RE: system() and STDOUT & STDERR

2001-10-25 Thread Bob Showalter
> -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

system() and STDOUT & STDERR

2001-10-24 Thread Gupta, Ashish
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

Re: stdout/stderr

2001-06-14 Thread Evgeny Goldin (aka Genie)
> 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

Re: stdout/stderr

2001-06-13 Thread Me
> 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.

stdout/stderr

2001-06-13 Thread Ronald J. Yacketta
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