getlist 633 B

12345678910111213141516171819202122232425262728293031
  1. # Find everything in my results directory that looks like lmbench output.
  2. #
  3. # Hacked into existence by Larry McVoy (lm@bitmover.com)
  4. # Copyright (c) 1994-1998 Larry McVoy.
  5. # $Id$
  6. eval 'exec perl -Ssw $0 "$@"'
  7. if 0;
  8. $LIST = "no such file";
  9. $LIST = "LIST" if (-f "LIST");
  10. $LIST = $ARGV[0] if (($#ARGV == 0) && (-f $ARGV[0]));
  11. if (-f $LIST) {
  12. open(L, $LIST);
  13. $_ = <L>;
  14. chop;
  15. @files = split;
  16. close(L);
  17. } else {
  18. @files = <*/*>;
  19. }
  20. foreach $file (@files) {
  21. next if $file =~ /\.INFO$/;
  22. open(FD, $file) || next;
  23. next unless defined($_ = <FD>);
  24. close(FD);
  25. next unless /^\[lmbench2.[01]/;
  26. print "$file ";
  27. }
  28. print "\n";
  29. exit 0;