http://qs321.pair.com?node_id=319574


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)
#!/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!