home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / languages / perl / scripts-convex / convex / rates < prev    next >
Encoding:
Text File  |  1990-03-14  |  311 b   |  11 lines

  1. #!/usr/bin/perl -P
  2. open (RATES, "/usr/convex/rates @ARGV |");
  3. (@rates = <RATES>) || die "Share not installed?\n";
  4. print    shift @rates;
  5. $total = pop @rates;
  6. #define CPU(X) substr(X,20,5) 
  7. print sort bycpu grep(CPU($_) != 0,@rates);
  8. sub bycpu { (CPU($a) < CPU($b)) ? 1 : -1; } 
  9. print $total;
  10. exit !close RATES;
  11.