RE: help in redirecting output to file

2008-11-24 Thread Jeff Pang
> Message du 24/11/08 08:23 > De : [EMAIL PROTECTED] > A : [EMAIL PROTECTED], beginners@perl.org > Copie à : > Objet : RE: help in redirecting output to file > > > Thanks but I need STD output and STD error in the same file. How should I do > that. > open STDERR

RE: help in redirecting output to file

2008-11-23 Thread Irfan.Sayed
redirecting output to file Why don't u use this code :- open NEW_OUT,">output.txt"; select NEW_OUT; # making output.txt to take the default STD output Hope this helps... BR/Nitin --- [EMAIL PROTECTED] wrote: > > Hi All, > > > > Can somebody please help me f

Re: help in redirecting output to file

2008-11-20 Thread Brian McCauley
On Nov 20, 2:15 pm, [EMAIL PROTECTED] (Irfan Sayed) wrote: > Hi All, > > Can somebody please help me for this block of code. > > if ("$1" ne "-log"){ > > `$0 -log "$@" 2>&1 | tee the_log_file.$$.log`; > > exit 0; > > } > > I know this code redirects the output of entire perl script to file but > it

Re: help in redirecting output to file

2008-11-20 Thread Nitin Kalra
Why don't u use this code :- open NEW_OUT,">output.txt"; select NEW_OUT; # making output.txt to take the default STD output Hope this helps... BR/Nitin --- [EMAIL PROTECTED] wrote: > > Hi All, > > > > Can somebody please help me for this block of code. > > > > if ("$1" ne "-log"){ >

help in redirecting output to file

2008-11-20 Thread Irfan.Sayed
Hi All, Can somebody please help me for this block of code. if ("$1" ne "-log"){ `$0 -log "$@" 2>&1 | tee the_log_file.$$.log`; exit 0; } I know this code redirects the output of entire perl script to file but it is not executing as expected. Can somebody please explain / help Re

RE: question on redirecting output of Perl debugger commands

2006-07-12 Thread Gavin Bowlby
gbowlby isp 113 Jul 12 15:28 dbug.txt bash-2.05b$ cat dbug.txt DB<2> main::(test.pl:4): print "x:$x\n"; DB<2> 1 <= mailto:[EMAIL PROTECTED] On Behalf Of Tom Phoenix Sent: Wednesday, July 12, 2006 12:11 PM To: Gavin Bowlby Cc: perl beginners

Re: question on redirecting output of Perl debugger commands

2006-07-12 Thread Tom Phoenix
On 7/12/06, Gavin Bowlby <[EMAIL PROTECTED]> wrote: I would like to see the results of the Perl debugging session in a file. The debugger wasn't made with that in mind, but you could work around it. At least, this works for me. open $DB::OUT, "| tee dbug.txt" or die if $DB::OUT; You may fin

Re: question on redirecting output of Perl debugger commands

2006-07-12 Thread Chasecreek Systemhouse
On 7/12/06, Gavin Bowlby <[EMAIL PROTECTED]> wrote: bash-2.05b$ cat test.pl #!/usr/bin/perl $x = 1; print "x:$x\n"; bash-2.05b$ perl -d test.pl | tee xxx 2>&1 > yyy Hmmm. You know, when posted previously I guess I should have stated that I had not yet gotten it to work myself but posted any

RE: question on redirecting output of Perl debugger commands

2006-07-12 Thread Gavin Bowlby
-2.05b$ So no output was sent to either the file "xxx" or "yyy". I would like to see the results of the Perl debugging session in a file. Gavin -Original Message- From: Chasecreek Systemhouse [mailto:[EMAIL PROTECTED] Sent: Sunday, July 09, 2006 3:21 PM To: beginne

Re: question on redirecting output of Perl debugger commands

2006-07-09 Thread Chasecreek Systemhouse
On 7/7/06, Gavin Bowlby <[EMAIL PROTECTED]> wrote: Is there a way to redirect the output of a debugger command to a file? What I use is Linux specific, sort of varies by bash and distro for example, but you are welcome to try it out (I asked in irc #bash before posting here) - ls -ial |tee cap

question on redirecting output of Perl debugger commands

2006-07-07 Thread Gavin Bowlby
Is there a way to redirect the output of a debugger command to a file? I've tried the: | format, which nicely brings up the "Pager" to allow one page of output at a time to be viewed, which works well with relatively small amounts of data. Unfortunately, my Perl app is large, has many variable

Re: Redirecting Output

2002-12-20 Thread Sugumar
Thanks for your responses. Regards, Sugumar Bob Showalter wrote: -Original Message- From: Sugumar [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 19, 2002 2:47 PM To: [EMAIL PROTECTED] Subject: Redirecting Output Hi, I'm trying this command from my perl program system ( &qu

RE: Redirecting Output

2002-12-20 Thread Bob Showalter
> -Original Message- > From: Sugumar [mailto:[EMAIL PROTECTED]] > Sent: Thursday, December 19, 2002 2:47 PM > To: [EMAIL PROTECTED] > Subject: Redirecting Output > > > Hi, > > I'm trying this command from my perl program system ( > "perl

Re: Redirecting Output

2002-12-20 Thread Rob Dixon
I don't know too much about redirecting output in Unix, but whatever will work on the command line should work in system(). Within perl, you can achieve the same effect with: open TMP, "> tmp.txt"; print TMP foreach `perldoc perldsc`; close TMP; HTH, Rob

Re: Redirecting Output

2002-12-19 Thread Mark Goland
t $ARGV[$#ARGV]: $!"; print WR_FH while ; #print output to a file ->paste - Original Message - From: "Sugumar" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, December 19, 2002 2:46 PM Subject: Redirecting Output > Hi, > > I'm

Redirecting Output

2002-12-19 Thread Sugumar
Hi, I'm trying this command from my perl program system ( "perldoc perldsc > tmp.txt"). I don't see the output going to the file tmp.txt; instead it shows the output in the screen.How could I get the output in some text file. Sugumar -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: Redirecting output

2002-09-20 Thread david
Jason Frisvold wrote: > Is there a way to redirect all the output (anything printed by the > program itself and any error output) back into the program so the > program can handle it? > > I'd like to be able to redirect it to itself so if there are any errors > or unexpected output during a cron

RE: Redirecting output

2002-09-20 Thread Bob Showalter
> -Original Message- > From: Jason Frisvold [mailto:[EMAIL PROTECTED]] > Sent: Friday, September 20, 2002 11:52 AM > To: [EMAIL PROTECTED] > Subject: Redirecting output > > > Is there a way to redirect all the output (anything printed by the > program itself

Redirecting output

2002-09-20 Thread Jason Frisvold
Is there a way to redirect all the output (anything printed by the program itself and any error output) back into the program so the program can handle it? I'd like to be able to redirect it to itself so if there are any errors or unexpected output during a cron job, it'll all get mailed to me...