1# $Id: rectype.awk,v 12.0 2004/11/17 03:43:25 bostic Exp $
2#
3# Print out a range of the log.
4# Command line should set RECTYPE to a comma separated list
5# of the rectypes (or partial strings of rectypes) sought.
6NR == 1 {
7	ntypes = 0
8	while ((ndx = index(RECTYPE, ",")) != 0) {
9		types[ntypes] = substr(RECTYPE, 1, ndx - 1);
10		RECTYPE = substr(RECTYPE, ndx + 1, length(RECTYPE) - ndx);
11		ntypes++
12	}
13	types[ntypes] = RECTYPE;
14}
15
16/^\[/{
17	printme = 0
18	for (i = 0; i <= ntypes; i++)
19		if (index($1, types[i]) != 0) {
20			printme = 1
21			break;
22		}
23}
24{
25	if (printme == 1)
26		print $0
27}
28