Mercurial > projects > dstress
comparison message_tie.pl @ 1093:7269c8972179
repo cleanup
author | thomask |
---|---|
date | Sun, 23 Jul 2006 12:59:39 +0000 |
parents | 5008714a9eb8 |
children |
comparison
equal
deleted
inserted
replaced
1092:80ae5c31d3eb | 1093:7269c8972179 |
---|---|
1 #!/usr/bin/perl | 1 #!/usr/bin/perl |
2 | |
3 use strict; | |
4 use warnings; | |
2 | 5 |
3 my $message_pattern = shift; | 6 my $message_pattern = shift; |
4 my $last_cmd; | 7 my $last_cmd; |
5 | 8 |
6 while (<>) { | 9 while (<>) { |
7 if ($_ =~ /^(run|norun|compile|nocompile): (.*)/){ | 10 if (/^(run|norun|compile|nocompile): (.*)/) { |
8 $last_cmd = $2; | 11 $last_cmd = $2; |
9 } | 12 } elsif (/$message_pattern/) { |
10 if(/$message_pattern/) { | |
11 print "$last_cmd\n$_\n"; | 13 print "$last_cmd\n$_\n"; |
12 } | 14 } |
13 } | 15 } |
14 |