Mercurial > projects > dstress
view message_tie.pl @ 1292:6b1e9ade787e
David Friedman <d3rdclsmail@earthlink.net>
2006-12-27
mail:4592A038.4080908@earthlink.net
author | thomask |
---|---|
date | Sat, 30 Dec 2006 13:39:46 +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"; } }