Marcos Rebelo wrote:
> try
>
> @temparry = `"$lcf_tools\\pslist EXCEL"`;
> foreach $temp (@temparray){
> next if $temp !~ /EXCEL/;
> ($name,$pid,$pri,$thd,$hnd,$Mem,$usertime,$kerneltime,$elapsedtime) =
> split(" ",$temp);
> ...
> }
Better would be
next if $temp !~ /^EXCEL/;
which is 'doesn
Zsdc wrote:
>
> Anthony J Segelhorst wrote:
>
> > I am working on script to kill a process if it have been running for 45
> > minutes or more.
> >
> > I am using a pstool called pslist to gather the data on the process. This
> > out put looks like:
> > (...)
> >
> > I started to build my array by
"Anthony J Segelhorst" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I am working on script to kill a process if it have been running for 45
> minutes or more.
>
> I am using a pstool called pslist to gather the data on the process. This
> out put looks like:
>
> C:\Tivoli\lcf\bin
Anthony J Segelhorst wrote:
I am working on script to kill a process if it have been running for 45
minutes or more.
I am using a pstool called pslist to gather the data on the process. This
out put looks like:
(...)
I started to build my array by doing:
@temparry = `"$lcf_tools\\pslist EXCE
try
@temparry = `"$lcf_tools\\pslist EXCEL"`;
foreach $temp (@temparray){
next if $temp !~ /EXCEL/;
($name,$pid,$pri,$thd,$hnd,$Mem,$usertime,$kerneltime,$elapsedtime) =
split(" ",$temp);
...
}
for avoiding errors, use 'strict' module
at beggining of the script do
use strict and define all