Re: log output

2005-03-16 Thread Nishi Prafull
I just tried using the tctee program as follows: #!/usr/local/bin/perl5.6 -w use strict; my $logFile ='/automateLabelPush.log'; //line 5 my $tee_cmd = '/tctee.pl'; my $cmd1 = qq{ }; system("$cmd1 | $tee_cmd -a $logFile") ; at the end of the execution, I still get sh: syntax error at line 5: "|"

RE: log output

2005-03-16 Thread Chris Devers
On Wed, 16 Mar 2005, Paul Ohashi wrote: > I can't see enough to determine why your script is failing, but > the four lines below work as expected: > > #!/usr/local/bin/perl > $logFile = '/home/paulo/mylog.log'; > $myCmd = 'ls -l'; > system ("$myCmd | tee -a $logFile"); > > Hope this helps... Is

RE: log output

2005-03-16 Thread Paul Ohashi
ge- From: Nishi Prafull [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 16, 2005 12:02 PM To: Paul Ohashi Cc: beginners@perl.org Subject: Re: log output I tried this system("$cmd1 | tee -a $logFile") ; but I get sh: syntax error at line 5: `|' unexpected where line 5 is the

Re: log output

2005-03-16 Thread Nishi Prafull
I tried this system("$cmd1 | tee -a $logFile") ; but I get sh: syntax error at line 5: `|' unexpected where line 5 is the line in which I declare the var for the output log my $logFile ="/automateLabelPush.log"; On Wed, 16 Mar 2005 10:59:31 -0800, Paul Ohashi <[EMAIL PROTECTED]> wrote: > What

RE: log output

2005-03-16 Thread Paul Ohashi
What if you piped your system command to tee, like: system("$cmd1 | tee -a outfile.log") ; -Original Message- From: Nishi Prafull [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 16, 2005 10:55 AM To: beginners@perl.org Subject: log output Hi: I am running a perl script as part of a cr