root/message_tie.pl

Revision 1093:7269c8972179, 230 bytes (checked in by thomask, 6 years ago)

repo cleanup

  • Property exe set to *
Line 
1 #!/usr/bin/perl
2
3 use strict;
4 use warnings;
5
6 my $message_pattern = shift;
7 my $last_cmd;
8
9 while (<>) {
10     if (/^(run|norun|compile|nocompile): (.*)/) {
11         $last_cmd = $2;
12     } elsif (/$message_pattern/) {
13         print "$last_cmd\n$_\n";
14     }
15 }
Note: See TracBrowser for help on using the browser.