Hi:
I need to run a script noted by $cmd1 from within perl but before that
i need to set the environment variable. how can i do it?
I tried
my $TEMPHOME = "/tmp";
system($cmd1);
But the script still complains the $TEMPHOME is not set.
Thanks.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For addi
I ttied it inside the perl script, but does not seem to work.
I did a echo for $TEMPHOME but it was not set.
On 7/18/05, John W. Krahn <[EMAIL PROTECTED]> wrote:
> Nishi Prafull wrote:
> > Hi:
>
> Hello,
>
> > I need to run a script noted by $cmd1 from within perl
Hi :
The following program needs to print the output of the cmd run to a
log file, it takes care of the directory separator issue, so the log
file could be created on any platform depending on where the program
is run.
But there is something missing ie the log file i am creating via this
program do
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: "|"
IL PROTECTED]> wrote:
> 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: beg
Hi:
I am running a perl script as part of a cron job and I want to log the
execution of the script(for sucess, failure).
In my script, I make calls to external software on the machine to run
certain tasks.
How can I direct the output of these tasks to a local log on my
machine during the execution
Hi:
I am running an external command through my perl script and I wanted
to print out the command output to some log file --
my $log = "/tmp/test.log";
my $cmd1 = qq{ ade useview viewname -exec 'ade label_product \\
-l $label -noinsert -prod dc' -print >> $log
};
syst
Analyst --- WGO <[EMAIL PROTECTED]> wrote:
> Nishi Prafull wrote:
> > Hi:
> > Apparently I noticed that when I put both the commands I need to run
> > in one script using the system call, the second command does not get
> > executed ( I cannot figure out the cause).
&
have to do anything else in this regard?
Thanks.
On Thu, 3 Mar 2005 15:50:16 -0800, Tim Johnson <[EMAIL PROTECTED]> wrote:
>
> I guess it partly depends on what you are trying to accomplish. Why are
> you calling a second script?
>
>
> -Original Message-----
>
Hi:
I would like to call a perl script(B.pl) within another perl script(A.pl).
Should I use the following approach or something else?
A.pl
-
my $cmd = "perl B.pl"
system($cmd);
Please let me know.
Thanks.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL P
yes :-)
I realised that after sending you the email. Sorry!
Thanks for the reply.
On Thu, 3 Mar 2005 14:18:04 -0800, Wagner, David --- Senior Programmer
Analyst --- WGO <[EMAIL PROTECTED]> wrote:
> Nishi Prafull wrote:
> > Hi All:
> >
> > Thanks for the replies.It wor
gt; [mailto:[EMAIL PROTECTED]
> >> Envoyé : jeudi 3 mars 2005 21:40
> >> À : Nishi Prafull
> >> Cc : beginners@perl.org
> >> Objet : RE: Perl program to convert system date to yymmdd
> >>
> >> Nishi Prafull wrote:
> >>> On Thu, 3 M
On Thu, 3 Mar 2005 12:12:35 -0800, Wagner, David --- Senior Programmer
Analyst --- WGO <[EMAIL PROTECTED]> wrote:
> Nishi Prafull wrote:
> > HI:
> >
> > I want to write a perl script that would compute the date in the
> > format yymmdd(050303) and subsitute it for
HI:
I want to write a perl script that would compute the date in the
format yymmdd(050303) and subsitute it for a variable in the perl
script. This variable is thereafter subsituted in a command that will
be run inside the script.
myTest.pl
var aDate;
get todays date and convert it to yymmdd and
14 matches
Mail list logo