Mercurial > projects > dstress
view message_tie.pl @ 1390:b8ff6a83c27f
Dstress on Mac OS X
Anders F Bj?rklund <afb@algonet.se>
2007-03-08
email:dd8a3d4db0d92fc8dcbfc0b01c368306@algonet.se
author | thomask |
---|---|
date | Thu, 08 Mar 2007 16:20:14 +0000 |
parents | 7269c8972179 |
children |
line wrap: on
line source
#!/usr/bin/perl use strict; use warnings; my $message_pattern = shift; my $last_cmd; while (<>) { if (/^(run|norun|compile|nocompile): (.*)/) { $last_cmd = $2; } elsif (/$message_pattern/) { print "$last_cmd\n$_\n"; } }