mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-23 01:29:33 +00:00
12 lines
325 B
Perl
12 lines
325 B
Perl
$match_me = pop @ARGV;
|
|
#print "searching for $match_me\n";
|
|
while (<>) {
|
|
s/#.*$//; # filter out comments
|
|
s/^\s*//; # filter out leading white space
|
|
@F=split /\s+/; # split on white space
|
|
if (($_ =~ m/\S\s+\S/) && ($match_me =~ m/$F[1]/)) {
|
|
print $F[0]."\n";
|
|
exit; #return only first match
|
|
}
|
|
}
|