chad kellerman wrote:
Sx,

/usr/bin/quota michele | perl -ne 'if(/none$/){print
"999999999\n"}elsif(m:^\s+/dev/:){($q,
$l)=(split(/\s+/))[2,3];$t=($l-$q)*1024};next if(!$t);{print $t."\n"}'

Is none a reserved word now?


I ask because quota doesnt return the same values across Unix opsys...

Otherwise if the vaslues are in $q and $l - why not add them?


Who said it wasnt appropriate for this list?

One liner or not - you have a valid question which should get a valid answer.

So, I will rewrite it this way -

if (/none$/) {
  print "999999999\n";
} elsif (m:^\s+/dev/:) {
      ($q,$l)=(split(/\s+/))[2,3];
      $t=($l-$q)*1024;
}

next if(!$t);

{
 print $t."\n";
}


Now, IMHO, it has become a beginners question. Anyone wish to take a crack at it?


How do you get the two input numbers added together?

-Sx-

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to