.\"
.\" Copyright (c) 2019 Eric Radman <ericshane@eradman.com>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd September 6, 2023
.Dt LABELGREP 1
.Os
.Sh NAME
.Nm labelgrep
.Nd progressive label file searcher
.Sh SYNOPSIS
.Nm labelgrep
.Ar pattern
.Ar file
.Op Ar file ...
.Sh DESCRIPTION
A pattern searcher for the
.Xr pln 5
format.
Displays the source file, label name, and highlights the contents matching a
regular expression.
.Pp
Lines beginning with
.Ql \&#
are ignored.
.Sh EXAMPLES
Find all of the instances where a service is restarted
.Pp
.Dl $ labelgrep 'rcctl|systemctl' *.pln
.Pp
Show all routes that include the wordpress configuration
.Pp
.Dl $ labelgrep 'wordpress' routes.pln
.Sh SEE ALSO
.Xr rset 1 ,
.Xr re_format 7
.Sh CAVEATS
.Nm
does not attempt to validate the format of each file.
