Hi All,
I have a following pgm which is been written in shell by calling another perl pgm 
(srvtst26.pl) in it.
Can any re-write the following to perl.
wud be appreicated ur earliest reply 


 
***************************************************************************************************
$xapipgm=srvtst26.pl
pgrep -f $xapipgm > /dev/null
if [ $? -eq 0 ]
then
        set `pgrep -f $xapipgm `
echo "AHD XAPI Server ($xapipgm) Running with Process Id: $1"
else 
echo "AHD XAPI Server is now Started Running."
set `date '+%Y %m %d %H %M' `
xapipgm=srvtst26.pl

perl -w $xapipgm >log/init/ahdxapi.init.$1$2$3.$4$5.log 
2>log/init/ahdxapi.init.$1$2$3.$4$5.err
perl -w $4$5>log/init/ahdxapi.init
fi

*******************************************************************************************************
RGDS
VENKAT

-----Original Message-----
From: John W. Krahn [mailto:[EMAIL PROTECTED]
Sent: Thursday, 3 July 2003 5:21 PM
To: [EMAIL PROTECTED]
Subject: Re: Getting the size of special files in a directory?


[EMAIL PROTECTED] wrote:
> 
> hi,

Hello,

> is it possible to get the size of special files in a directory?

Yes.

> i need the size of all gz or html files.

my $total_size;
$total_size += -s for <*.gz *.html>;

> this works, i did it with glob.
> but how can i get the size of files that match a pattern? for example
> all filesnames that contain the string "setup".

my $total_size;
$total_size += -s for <*setup*>;

> or all files that are
> younger than 7 days and not bigger as 100k and end with gz.

my $total_size;
-M < 7 and -s _ < 100_000 and $total_size += -s _ for <*.gz>;


John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to