#!/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"; } }
In reply to Re: Re: Using Perl to detect RAM amount
by spartan
in thread Using Perl to detect RAM amount
by Tommy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |