The code is listed below. I have not figured out how to capture multipe disk
drive entries.
Thanks
===================
#!perl
use warnings;
my $server;
my $fcode;
my $i;
my $r;
my $k;
my $j;
my $ii;
my $a;
my $b;
my $c;
my $d;
my $e;
my $f;
my $g;
my $server_name;
my $manufac;
my $model;
my $num_procs;
my $mem;
my $spack;
my @SLURP_server;
my $line;
my $found;
open(SERVERS, "sample.txt");
@SLURP_server=<SERVERS>;
close (SERVERS);
#####################################################################################
for ($i=0; $i <= $#SLURP_server; $i++) {
$line=$SLURP_server[$i];
chomp($line);
if ($line =~ m/^Server Name/) {
($a,$server_name)=split(/:/,$line);$i++;
}
$line=$SLURP_server[$i];
chomp($line);
if ($line =~ m/^Manufacturer/) {
($b,$manufac)=split(/:/,$line);$i++;
}
$line=$SLURP_server[$i];
chomp($line);
if ($line =~ m/^Model/) {
($c,$model)=split(/:/,$line);$i++;
}
$line=$SLURP_server[$i];
chomp($line);
if ($line =~ m/^Number Of Processors/) {
($d,$num_procs)=split(/:/,$line);$i++;
}
$line=$SLURP_server[$i];
chomp($line);
if ($line =~ m/^Mem Total/) {
($e,$mem)=split(/:/,$line);$i++;
}
$line=$SLURP_server[$i];
chomp($line);
if ($line =~ m/^Service Pack/) {
($f,$spack)=split(/:/,$line);
}
print "$server_name:$manufac:$model:$num_procs:$mem:$spack\n";
}
===================
On Wed, Sep 17, 2008 at 4:03 PM, Mr. Shawn H. Corey <[EMAIL PROTECTED]>wrote:
> On Wed, 2008-09-17 at 15:21 -0400, Aali Naser wrote:
> > Can any one help me with the logic for this type data processing?
>
> Yes. What code do you have so far?
>
>
> --
> Just my 0.00000002 million dollars worth,
> Shawn
>
> "Where there's duct tape, there's hope."
> Cross Time Cafe
>
> "Perl is the duct tape of the Internet."
> Hassan Schroeder, Sun's first webmaster
>
>