in reply to Re: Using Perl to detect RAM amount
in thread Using Perl to detect RAM amount
This should work on all modern sparc platforms (sun4u mostly)
Very funny Scotty... Now PLEASE beam down my PANTS!
#!/usr/bin/perl -w use strict; chomp (my @data=`/usr/platform/\`uname -m\`/sbin/prtdiag`); foreach my $line (@data) { if ($line =~ /Mem/) { my @needed_line=(split /\s+/, $line); print "Memory = ".$needed_line[2]."\n"; } }
Very funny Scotty... Now PLEASE beam down my PANTS!
|
---|
In Section
Seekers of Perl Wisdom